mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-29 00:17:16 +02:00
improved examples code
This commit is contained in:
@ -13,6 +13,10 @@ Please install ESP8266 board manager (tested with version 3.0.0)
|
||||
If you are a school or university contact us for a free trial on the AirGradient platform.
|
||||
https://www.airgradient.com/schools/
|
||||
|
||||
Kits with all required components are available at https://www.airgradient.com/diyshop/
|
||||
|
||||
If you have any questions please visit our forum at https://forum.airgradient.com/
|
||||
|
||||
MIT License
|
||||
*/
|
||||
|
||||
@ -25,10 +29,17 @@ void setup(){
|
||||
}
|
||||
|
||||
void loop(){
|
||||
|
||||
TMP_RH result = ag.periodicFetchData();
|
||||
Serial.print("Humidity: ");
|
||||
Serial.print(result.rh_char);
|
||||
Serial.print(" Temperature: ");
|
||||
Serial.println(result.t_char);
|
||||
|
||||
Serial.print("Relative Humidity in %: ");
|
||||
Serial.println(result.rh);
|
||||
|
||||
Serial.print(" Temperature in Celcius: ");
|
||||
Serial.println(result.t);
|
||||
|
||||
Serial.print(" Temperature in Fahrenheit: ");
|
||||
Serial.println((result.t * 9 / 5) + 32);
|
||||
|
||||
delay(5000);
|
||||
}
|
||||
|
Reference in New Issue
Block a user