I need a sketch for an ESP8266 that will connect directly to a mySQL database and retrieve two variables in a loop.
Program sequence
- Connect to WiFi
- Connect to hosted mySQL database
- Start Loop
- Read $Data_value from mySQL
- Read $Time to next refresh from mySQL
- Send $Data_value to data pin
- Wait $Time
- Repeat
Notes
The module needs to connect directly to the database without other scripts.
Altering an open source example is fine. This project will also be open source.