A raspberry pi is essentially a full computer with security risks, a drastically larger physical footprint, and significantly higher power dissipation needs than what I am discussing. The last two are big problems with almost all forms of IOT and a large part of why Espriff is popular right now...