In the previous article we showed a sample LUA code for ESP8266
Let us now see an example in which we’ll use the enduser_setup Lua module.
As a first step we compile the nodemcu firmware by including the enduser_setup module. We have to apply the same steps discussed in the build process article
editing the app/include/user_modules.h file and uncommenting the line
After the building and firmware upload to the device, we use a switch connected to nodemcu dev kit as shown in the picture
The pin D5 can be connected to a low or high input voltage. Based on the input voltage we can change the behavior of the system.
Note: The Pin D5 in this specific example has been used as Input Pin; in the case of use as Output Pin, you must insert a resistor to limit the output current, as specified in the link
In the next article we’lll upload a LUA sample code with enduser_setup module enabled and we’ll utilize it to manage the wifi connections