Software Problems: Difference between revisions
(Created page with "Stacks =Software Problems= ==SoftwareSerial== SoftwareSerial sounds like a great way to free up your HardwareSerial connection to the computer, in example for debugging...") |
No edit summary |
||
Line 1: | Line 1: | ||
[[ | [[IoT with AME|Home]] | ||
=Software Problems= | =Software Problems= | ||
Line 15: | Line 15: | ||
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. | 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. | ||
[[ | [[IoT with AME|Home]] | ||
__NOTOC__ |
Revision as of 23:05, 14 June 2018
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.