meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
home_automation:esp8266:nodemcu [2016/12/28 13:32] niziak [Other Projects] |
home_automation:esp8266:nodemcu [2017/01/19 07:55] (current) niziak [Other Projects] |
||
---|---|---|---|
Line 28: | Line 28: | ||
* Current API: [[https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en]] | * Current API: [[https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en]] | ||
+ | |||
+ | ===== Saving memory ===== | ||
+ | * Avoid upvalues for context passed between event callbacks, as its very difficulat to get a handle on memory leaks created by these. Only use globals for this usecase. | ||
+ | * Nil globals once they are no longer needed so that they can be properly GCed. | ||
+ | * Allocate resources and create closures on a just-in-time basis. | ||
+ | * The cost of require or dofile is relatively small, so break your program into overlays one per event and use a small stub function as a callback to load each. | ||
+ | * Use compiled .lc files and load using dofile(). | ||
===== Scan WiFi ===== | ===== Scan WiFi ===== | ||
Line 65: | Line 72: | ||
* 1-wire temp sensor reporting to [[http://nettemp.pl]], [[http://techfreak.pl/bezprzewodowe-czujniki-na-esp8266-nettemp/]] | * 1-wire temp sensor reporting to [[http://nettemp.pl]], [[http://techfreak.pl/bezprzewodowe-czujniki-na-esp8266-nettemp/]] | ||
* [[http://techfreak.pl/bezprzewodowe-czujniki-temperatury-ds18b20-na-esp8266/]] | * [[http://techfreak.pl/bezprzewodowe-czujniki-temperatury-ds18b20-na-esp8266/]] | ||
+ | * 1-wire temp sensor [[https://blog.jokielowie.com/en/2015/10/domoticz-cz-2-termometr-wifi-z-precyzja-do-dwoch-miejsc-po-przecinku-czyli-esp8266-dla-poczatkujach-w-praktyce/]] | ||
* Control 2 GPIO from Web [[http://randomnerdtutorials.com/esp8266-web-server/]] | * Control 2 GPIO from Web [[http://randomnerdtutorials.com/esp8266-web-server/]] | ||
* Http server [[https://github.com/marcoskirsch/nodemcu-httpserver]] | * Http server [[https://github.com/marcoskirsch/nodemcu-httpserver]] |