1
0

http requests from esp32 to api

This commit is contained in:
Jose
2025-04-09 14:19:52 +02:00
parent 0c03c052b4
commit 245f213ad9
15 changed files with 72 additions and 37 deletions

View File

@@ -1,6 +1,8 @@
#include "main.hpp"
const uint32_t deviceId = getChipID();
String response;
HTTPClient httpClient;
uint32_t getChipID()
{
@@ -15,12 +17,16 @@ void setup() {
Serial.begin(9600);
// WiFi Connection
if(setup_wifi() != 0)
if(setupWifi() != 0)
{
Serial.print("Error connecting to WiFI");
Serial.print("Error connecting to WiFi");
}
// test get
getRequest(httpClient, "http://172.20.10.7:8082/api/v1/sensors/1/values", response);
deserializeSensorValue(httpClient, httpClient.GET());
}
void loop() {
}