Wazakindjes cdae53cf7c Added sketches: esp01_initial, esp12e_airconditioner 1 year ago
..
README.md cdae53cf7c Added sketches: esp01_initial, esp12e_airconditioner 1 year ago
esp12e_initial.ino cdae53cf7c Added sketches: esp01_initial, esp12e_airconditioner 1 year ago

README.md

The fuck is this

This shit is just an initial sketch to test if an ESP-12E m0dule functions pr0perly. ;]

Features

  • Supports OTA flash
  • Netserial (more on that bel0w)

Parts/components:

  • NodeMCU v3 (dev b0ard) w/ ESP-12E onboard (although anything with any ESP-12* would pr0lly werks tho ;])

Configuration

The .ino file has a marked config section with all the options explained. ;];]];];;]];]];

The fuck is netserial tho

While reading the c0dd you may have seen something I call "netserial", which was basically just some haccs done for lulz. It's a way to monitor debugging information over the network, in case of having the ESP in production and not easily available for a true serial connection.

When booting up and after getting an IP address, the ESP will automatically calculate the broadcast address for the network it's in and send messages to it. An example message is [OTA] Starting sketch flash).

To receive the broadcast I'm using the ncat tool from the nmap package, which is a different program than the default netcat. It has more options and is the only one I found worked reliably in receiving the messages. I simply slammed the following alias in muh .bash_profile: alias netserial-esp8266="ncat --recv-only -u -v -l -C 192.168.133.255 1338"

Deep sleep wake-up

Since the ESP flushes a lot of information when it goes into deep sleep m0de, you need to connect its WAKE pin (D0, GPIO 16) to the RST pin in order to do a timed wake-up. Keep in mind that because it flushes almost everything, you actually need to have the ESP go through a reboot. Otherwise WiFi is down, netserial is down, ETCETTECTCTECETC.

Also, since I made this for my NodeMCU b0ards, deep sleep may or may not work properly on bare ESP-12 modules. :DDDDDDD