Arduino/ESP8266/etc h4x lol

Wazakindjes e197f7c804 Fix links maybebaybe 2 weeks ago
esp01_initial e197f7c804 Fix links maybebaybe 2 weeks ago
esp12e_airconditioner e197f7c804 Fix links maybebaybe 2 weeks ago
esp12e_initial e197f7c804 Fix links maybebaybe 2 weeks ago
esp12e_nfc dfd045f0b0 Fix links maybebaybe 2 weeks ago
.editorconfig 8ffc3b6068 Added editorc0nfig =] 9 months ago
.gitignore 7d6df598b0 Repo creati0n: esp8266_airconditioner.ino 2 years ago
LICENSE 7d6df598b0 Repo creati0n: esp8266_airconditioner.ino 2 years ago
README.md 1bec21e43c Upd00ted readmuhs 2 weeks ago

README.md

The fuck is this

This shit is a dankass repository for h0sting sketches for use with Arduino-type and compatible microcontrollers (like ESP8266-based shit). [=[[=[=[==[[= As a generic term for all such boards I will simply use ESP, sketches will mention more specific b0ards. ;];]

Some general information that applies to multiple sketcherin0s

The fuck is netserial

I made up something called "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. It's unencrypted shit though, so prolly better not send any sensitive info lel.

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 (nc is a shorthand for the latter). 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" (the IP being the broadcast address of your subnet and port dependent on a sketch's MUHCONF_NETSERIAL_POT).

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, the API is down, netserial is down, ETCETTECTCTECETC.

Also, since I'm usually testing with NodeMCU b0ards, deep sleep may or may not work properly on bare ESP modules. :DDDDDDD

Some firmware notes

I noticed when I started using HTTPS that the ESP would sometimes shit out an exception and reboot. Apparently that's caused by the default CPU speed of 80 MHz being too l0w for the encryption bullshit and it rips pretty damn hard. As per this comment on GitHub, set the firmware's CPU frequency to 160 MHz. It's technically overclocking but it works fine for me. [=[=[

Some todo shit

Just to keep this in a place outside of the actual sketches. ;]

  • Look into moving shared custom shit (e.g. netserial) to a library of sorts

Contrib00tin

If you wrote some nice haccs then make a pull request and I might merge that shit. ;] Just keep in mind that every sketch should always have its own directory and README file. Said README should include clear information on the setup, but you may assume that people at least know how to do basic things like setting up the IDE and flashing their shit. ;] Some key points:

  • You should explicitly state what microcontroller/dev board you're using, as a sketch may or may not be compatible with comparable b0ards
  • Include information about the wiring etc, so people don't have to look around for ages trying to figure out that shit by themselves
  • In some cases the reason for using a certain component may not be immediately clear, so explain that too
  • Preferably write the README in chronological order, i.e. list components first, then wiring information, followed by configuration, etc
  • You don't need to include info about the actual application (e.g. putting it all together in a case and all that shit), just assume people are working on breadb0ards
  • The sketch should probably work and compile using the Arduino IDE, as that's likely what people will be using lel

Or just look at mein esp12e_airconditioner shit for an indication of the necessary inf0.