-
Forum
-
Software discussions
-
Arduino Code
-
ESP8266 - Wemos D1 Mini - Arduino Code - Bare-bones code, verified working
ESP8266 - Wemos D1 Mini - Arduino Code - Bare-bones code, verified working
Less
More
-
Posts: 1
-
Thank you received: 0
-
-
1 week 6 days ago - 1 week 6 days ago #7472
by wooden_goat
This is excellent reference code for sending data to Radmon, and was excellent for someone like me who isn't as proficient with the software side of development as the hardware.
It works on ESP32 with zero modification. I'd like to point out that the return and newline placeholders near the end of the updateRadmon() method mustn't be removed, they are essential for the HTTP request. I really was wondering what was going on there! clientGet.println("Connection: close\r\n\r\n");
For other newbees, if it isn't clear exactly how the website accepts readings, pay attention to the updateRadmon() method above that uses HTTP GET to send the data to the server. There really should be an article about it for absolute beginners, sorry if there is and I've missed it.
If HTTP GET is not familiar to you start here https://www.w3schools.com/tags/ref_httpmethods.asp (I promise it's simple.)
Despite the name, GET and POST can both be used to send data to a server.
Last edit: 1 week 6 days ago by
wooden_goat. Reason: Noted that it is compatible with ESP32 and not to change the content of the HTTP request.
Please Log in or Create an account to join the conversation.
-
Forum
-
Software discussions
-
Arduino Code
-
ESP8266 - Wemos D1 Mini - Arduino Code - Bare-bones code, verified working
Time to create page: 0.152 seconds
Solar powered Raspberry Pi 4 server stats: CPU 42% Memory 13% Swap 7% CPU temp=52.1'C Uptime 3 Days