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