![]() The code is well commented on where you should make the changes. Modify the next lines with your network credentials: SSID and password. Int httpResponseCode = http.POST(httpRequestData) ĭownload Code Setting your network credentials ![]() If ((millis() - lastTime) > timerDelay) " Send an HTTP POST request every 10 seconds Random seed is a number used to initialize a pseudorandom number generator Serial.println("Timer set to 10 seconds (timerDelay variable), it will take 10 seconds before publishing the first reading.") Serial.print("Connected to WiFi network with IP Address: ") For a final application, check the API call limits per hour/minute to avoid getting blocked/banned THE DEFAULT TIMER IS SET TO 10 SECONDS FOR TESTING PURPOSES Domain Name with full URL Path for HTTP POST Request Arduino Sketch-ESP32 HTTP POST ThingSpeakĬopy the next sketch to your Arduino IDE: //import required libraries Step-3 : On creating new channel we will get two API Keys for writing a data to the channel and Reading a data from channel. Step-2 : Then, open the Channels tab and Create a New Channel. Step-1 : Go to and create a free account. To use ThingSpeak with your ESP32, you need an API key. In this concept of the ESP32 board with Arduino IDE, will make an HTTP POST request to send a new value to ThingSpeak. Concept-ESP32 HTTP POST Data (ThingSpeak) Recommended Tutorial: ESP32 with Arduino JSON Using Arduino IDE to understand the how to handle JSON script with Arduino IDE.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |