mtongnz / ESP8266_ArtNetNode_v2

ESP8266 based WiFi ArtNet to DMX, RDM and LED Pixels
GNU General Public License v3.0
611 stars 158 forks source link

Some work to get it stable #91

Closed scamiv closed 6 years ago

scamiv commented 6 years ago

Hi, I spent some time fixing the major annoyances. In the WS2812 code i added a routine to halt the NMI while outputting the led data, this fixes the random flicker issue. ( from https://www.esp8266.com/viewtopic.php?f=9&t=3979&start=20 )

Webserver: I added the TCP cleanup code from https://github.com/esp8266/Arduino/issues/1923 this fixes the biggest Memleak and helps against crashes. I modified the webserver to use ServeStatic this safes some heap and allows to send the files gzipped. This makes the interface more snappy while lowering the load on the heap some more. Added cache header.

The main loop now checks for low heap, if heap gets critical we do a reset. Didn't have a hard freeze since.

Changed a lot of strings over to PROGMEM.

Theres now a pwmports[] array, it defines pins that will be accessible for PWM at universe 10.

Still need to do some cleanup before a merge.

Compile options: CPU Frequency needs to be 160mhz, SDK 2.4.1 recommeded. Set lwIP to "V2 Lower Memory" Dont forget to upload SPIFFS (click on "ESP8266 Sketch Data Upload")