Preliminary testing of WiFi control using the ESP8266 module.
But… there’s always a downside, isn’t there?
As of now the #ISML uses the ATmega168PA-MU [QFN32], 16kb of FLASH (sufficient), 1kb of RAM (insufficient).
WiFi works stand-alone, button-control works stand-alone, but the combination of the two produces erratic behaviour, which is a sure-fire sign of RAM issues on micro-controllers.
The WiFi code has to read & evaluate HTTP-request strings, which is a RAM-hog. The library dealing with the 64 WS2812B RGB LEDs takes a chunk of RAM, the button-library as well, and lastly, the serial port uses buffer as well.
The erratic bahaviour seems to be caused by data being overwritten in RAM. I’ve already optimized the code to cut RAM usage, passing pointers to big chunks of data instead of data chunks themselves to functions… the usual stuff. There’s still not enough left to work reliably.
So… out with the ATmega168PA-MU, in with the ATmega328P, essentially a “double everything” chip. Interestingly, the 328P is a bit cheaper than the 168PA ;-)
“Make it bigga!”