|
|
@ -1,6 +1,6 @@ |
|
|
|
#include <math.h>
|
|
|
|
|
|
|
|
int DustSensePin = 14; |
|
|
|
int DustSensePin = 13; |
|
|
|
unsigned long duration; |
|
|
|
unsigned long starttime; |
|
|
|
unsigned long sampletime_ms = 30000;//sample 30s ;
|
|
|
@ -11,6 +11,7 @@ float concentration = 0; |
|
|
|
void setup() |
|
|
|
{ |
|
|
|
Serial.begin(9600); |
|
|
|
Serial.println("Starting Air Sensor, please wait for readings..."); |
|
|
|
pinMode(DustSensePin,INPUT); |
|
|
|
starttime = millis();//get the current time;
|
|
|
|
} |
|
|
|