As the title says... Chat on...

User avatar
By Geneous
#83992 I'm starting a home electric load-leveling project and discovered IFTTT for Smart Thermostats, etc. The available T-stat's respond to IFTTT invokings ("Then" actions) but don't create "This" triggers upon their own actions. However, there is a ESP8266-01 project (https://www.hackster.io/noelportugal/if ... ton-e11841) that will act as a trigger to an IFTTT Applet. It looks very hackable to make triggers for lots of events, including changing voltages on the T-stat to A/C unit wires. One problem the ESP8266-01 module only breaks out 2 of the 8266's 16 GPIO pins and one is used to make the .lua script work. That doesn't leave much hacking freedom. Behold, the modeMPU module with all the of 8266 GPIO pins available to us! My question is, given that relevant libraries are copied, would .lua scripts from ESP8266-01 development work in modeMPU development?
User avatar
By marcelstoer
#83996
Geneous wrote:modeMPU module


What is that? Never heard of it. There's a somewhat dated comparison of modules at https://frightanic.com/iot/comparison-o ... nt-boards/

Geneous wrote:given that relevant libraries are copied


Not sure what you mean. The NodeMCU firmware C modules are compiled into the firmware binary.
User avatar
By QuickFix
#84002
Geneous wrote:One problem the ESP8266-01 module only breaks out 2 of the 8266's 16 GPIO pins

You've actually got 4 GPIO's at your disposal with the ESP-01: TX = GPIO1 and RX = GPIO3. :idea:

Geneous wrote:That doesn't leave much hacking freedom.

Not sure how the word "Hacking" applies here: you just write firmware for an MCU connected to external hardware through the GPIO's. :?
I assume you're using this word in a slang sort of way (but see my signature below about making assumptions) ;)

Geneous wrote:Behold, the modeMPU module with all the of 8266 GPIO pins available to us!

You're probably referring to the NodeMCU which is a development board (an ESP-12 module with all necessary hardware, like an USB-UART bridge, to easily develop code)

The ESP-01 is just a module on its own: there are lots of modules available, most used are the ESP-01 (nobody knows why, since it's pretty limited, like you've also discovered) and the ESP-12, but there are a couple of more usable modules available, depending on your needs.

Since the ESP-01 has the same ESP8266 controller as all the other modules, code written with the ESP-01 in mind also fits inside, for instance, an ESP-12 and vice versa (as long as memory limits are not at play).

And since a NodeMCU uses an ESP-12 module, you can use the code you're referring to with it.
User avatar
By Geneous
#84013 Thank you for setting me straight on several things. Some of my work (in the 80s) was on room filling Main Frames, so mixing up MCP with MPU comes with the territory :lol:

Here is what started me down this path: https://www.hackster.io/noelportugal/if ... ton-e11841

Geneous wrote:One problem the ESP8266-01 module only breaks out 2 of the 8266's 16 GPIO pins

QuickFix wrote:You've actually got 4 GPIO's at your disposal with the ESP-01: TX = GPIO1 and RX = GPIO3. :idea:

Terrific! I missed that in the docs. So with 3 pins now available to me, I can externally select between 8 triggers within the .lua script! I also missed how the .lua script used pin "4" to refer to GPIO02 when the 8266 doc calls it pin 14???

QuickFix wrote:The ESP-01 is just a module on its own: there are lots of modules available, most used are the ESP-01 (nobody knows why, since it's pretty limited, like you've also discovered) and the ESP-12, but there are a couple of more usable modules available, depending on your needs.

ESP-01 is really cheap and really small, thus easy to hide in a small box or hole in the wall.

QuickFix wrote:And since a NodeMCU uses an ESP-12 module, you can use the code you're referring to with it.

With 3 GPIO pins available to me now, the ESP-01 can do my job. :D Since the .lua script uses GPIO2 to feed back into CH_PD, my reading of the docs says that's pin EN on the ESP-12, yes?