From IoT with AME
Revision as of 14:47, 15 June 2018 by Ctreber (Talk | contribs)

Jump to: navigation, search


Embedded Software Problems

C++ and very small memory pose diverse challenges. The Arduino runtime environment has its intricacies as well.

And then there is other people's software you may not have access to, such as firmware in components. Yes, ESP8266, I'm looking at you! The EP8266 is great: It gives your IoT device WLAN and IP connectivity for only a few bucks.

On the other hand, the ESP8266 is quite a hand full: It creates power spikes that have negative impact on its own operation and possibly that of your entire circuit, it experiences out-of-the-blue resets that have to be dealt with, and it suffers hang-ups that can only be cured with a hardware reset or uttering "The IT Crowd" mantra ("have you tried turning it off and on again";

I have had A LOT of trouble with the ESP8266 before I had a lot of fun. Some problems can be solved with a proper power supply, a bit of hardware, and somewhat sophisticated error handling. Other, more persistent problems can only be addressed with resetting the chip or even cycling its power supply.

  • C++ is not Java - C++ can be harsh for people used to Java. Especially memory handling holds a number of surprises.
  • Memory Usage - The Arduino is small and powerful - and it all needs to fit in 32kB of flash and 2kB of RAM.
  • SoftwareSerial - Sounds great, causes frustration. Emulation thing that need to happen fast has limits.
  • Flaky ESP8266 Behavior - It's not always you, sometime the ESP8266 has it's own mind