16#define SERIAL_BAUD 115200
18const char ssid[] =
"wifi-network-here";
19const char pass[] =
"wifi-password-here";
23const char data[] =
"message-here";
39 Serial.print(
"SSID: ");
41 Serial.print(
"Password: ");
43 Serial.print(
"Connecting");
49 while (WiFi.status() != WL_CONNECTED) {
55 Serial.println(
"Connected!");
56 Serial.println(WiFi.localIP());
60 const uint8_t* resp_data;
66 Serial.print(
"Response Code: ");
70 Serial.println(
"Response:");
71 Serial.println(http_client.
Data().c_str());
Logic for interfacing with the Dirtviz API.
unsigned int SendMeasurement(const uint8_t *meas, size_t meas_len)
Send serialized measurement to the API.
HttpClient GetResponse()
Get the response from the server.
HTTP request parser library.
unsigned int ResponseCode()
Get the http response code.
std::string Data()
Get data from Http request.
void setup()
Initialization code run on startup.
Dirtviz api("ip address here")