I would like my device placed outside to send me readings every 30min, as well as to Thingspeak. Ive read the datasheet for the sensor, particularly the different sampling modes, and I'm not sure if I need to keep updating the values from the sensor like:
Code: Select all
float temp, hum, pres;
setup(){
// get things ready, etc
}
loop(){
temp = bmp.readTemperature();
temp = bmp.readTHumidity();
pres = bmp.readPressure() / 100;
if (30minHavePassed){
sendToMe();
sendToThingspeak();
}
Code: Select all
float temp, hum, pres;
setup(){
// get things ready, etc
}
loop(){
if (30minHavePassed){
readings();
sendToMe();
sendToThingspeak();
}
readings(){
temp = bmp.readTemperature();
temp = bmp.readTHumidity();
pres = bmp.readPressure() / 100;
}