Slide 12
Slide 12 text
void loop() {
char data[100];
int status;
alcohol = analogRead(SENSOR_PIN);
SerialUSB.print("sensor test value = ");
SerialUSB.println(alcohol);
delay(1000);
sprintf(data, "{\"alcohol\": %d}", alcohol);
if (!Wio.HttpPost(URL, data, &status)) {
SerialUSB.println("### ERROR! ###");
goto err;
}
err:
delay(3000);
}