Update adafruitio_00_publish_modified.cpp added temperature and pressure

beta-mqtt
Alan Johnston 2 years ago committed by GitHub
parent c227067d95
commit 507546714e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -27,7 +27,11 @@
int count = 0; int count = 0;
// set up the 'counter' feed // set up the 'counter' feed
AdafruitIO_Feed *counter = io.feed("counter"); //AdafruitIO_Feed *counter = io.feed("counter");
AdafruitIO_Feed *temperature = io.feed("temperature");
AdafruitIO_Feed *pressure = io.feed("pressure");
AdafruitIO_Feed *altitude = io.feed("altitude");
AdafruitIO_Feed *humidity = io.feed("humidity");
void aio_setup() { void aio_setup() {
@ -66,10 +70,13 @@ void aio_loop(float tlm[]) {
Serial.print("\nsending to Adafruit IO -> "); Serial.print("\nsending to Adafruit IO -> ");
// Serial.println(count); // Serial.println(count);
// counter->save(count); // counter->save(count);
Serial.println(tlm[0]); Serial.print(tlm[0]);
counter->save(tlm[0]); temperature->save(tlm[0]);
Serial.println(tlm[1]); Serial.print(" ");
counter->save(tlm[1]); Serial.print(tlm[1]);
pressure->save(tlm[1]);
Serial.println(" ");
// increment the count by 1 // increment the count by 1
count++; count++;

Loading…
Cancel
Save

Powered by TurnKey Linux.