mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-12 07:26:30 +02:00
v1.0.2
-Changed getCO2 to return a char and if sensor is non existent will return NULL -Changed getPM2 to return a char and if sensor is non existent will return NULL -Added a new function getPM2_Raw which will return the value of PM2 as an integer -Added a new function getCO2_Raw which will return the value of CO2 as an integer -Added 2 new variables in the TMP_Raw Struct: 1. t_Char 2. rh_Char These variables will be used to store the corresponding values as char and if sensor is nonexistent should be NULL
This commit is contained in:
@ -3,14 +3,14 @@ AirGradient ag = AirGradient();
|
||||
|
||||
void setup(){
|
||||
Serial.begin(9600);
|
||||
ag.C02_Init();
|
||||
ag.CO2_Init();
|
||||
}
|
||||
|
||||
void loop(){
|
||||
|
||||
int CO2 = ag.getC02();
|
||||
int CO2 = ag.getCO2_Raw();
|
||||
Serial.print("C02: ");
|
||||
Serial.println(CO2);
|
||||
Serial.println(ag.getCO2());
|
||||
|
||||
delay(5000);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user