Hi, this is the first time I share info about my project on the official Arduino forums Feedback and questions are welcome.
This project is like "communications 101" for ESP32/ESP8266, or at least that's what I intended to create. Although vanilla sketch provides for control only over a primitive ON/OFF load, sketch can be used as a handy template and supplemented as necessary.
So, Billy the Relay is an Arduino project written for ESP32 and ESP8266 modules (systems-on-chip). Billy can control simple (ON/OFF) load like an LED or (by means of a driver) a relay. Billy itself takes commands over:
- UART by a cable connection.
- Wi-Fi as a local TCP server, e.g. from a classic Unix utility
netcat
(nc
) or an Anroid app like Serial Wi-Fi terminal. - Wi-Fi as a local HTTP server, e.g. from a browser (sketch provides a simplistic web interface) or a different app capable of sending HTTP requests.
- Bluetooth Classic as a slave device, e.g. from a desktop Bluetooth terminal or an Android app like Serial Bluetooth Controller.
- Wi-Fi as a TCP client (inter alia via Internet). To do so Billy sends requests to a custom-programmed TCP server and receives commands as a response (this implementation is described in detail below).
Billy works within a local Wi-Fi network in a station (STA) mode. Billy uses Internet access provided by a local access point.
Billy's operations rely heavily on module's inbuilt flash memory storage. When you specify an SSID, a password, a port number, etc. they are saved in inbuilt storage and thus you don't need to assign them again in case of device reboot.