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

Jump to: navigation, search

Home

Software Problems

SoftwareSerial

SoftwareSerial sounds like a great way to free up your HardwareSerial connection to the computer, in example for debugging purposes. But it is a source of grief using it to communicated with the ESP8266. You'll be limited to low speed, and chances are you will loose characters anyways.

My recommendation: Don't do it, it is an avoidable source of self-created troubles. Programming with an ISP is not a big deal, and so is logging with I2C. Check out AC.programmer!

Memory Usage

Talking to the ESP8266, dealing with its quirks, and putting a MQTT client on top easily consumes half of the 32kB of program memory and half of the 2kB data memory normal Arduinos have to offer.

I first tried to let the air out of the PubSubClient and ESP8266Client libraries, succeeded to a degree, and then decided to write my own MQTT- and ESP8266 libs, designed to rely on streaming as much as possible and to reduce the use of buffers to a few and small occasions, and make use of more compact and readable code.

Home