Wazakindjes cdae53cf7c Added sketches: esp01_initial, esp12e_airconditioner 1 year ago
..
README.md cdae53cf7c Added sketches: esp01_initial, esp12e_airconditioner 1 year ago
esp01_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-01 m0dule functions pr0perly. ;]

Features

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

Parts/components:

  • ESP-01 m0dule (anything ESP-01* 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

Although the ESP-01 supports deep sleep, you need to solder a tiny pin on the chip to (iirc) the RST pin on the ESP. Since I didn't bother, this sketch does not wake up from deep sleep.