User manual

IDUINO for makers life
www.openplatform.cc
float voMeasured = 0;
float calcVoltage = 0;
float dustDensity = 0;
void setup(){
Serial1.begin(230400);
pinMode(ledP,OUTPUT);
}
void loop(){
digitalWrite(ledP,LOW); // power on the LED
delayMicroseconds(280);
voMeasured = analogRead(dustPin); // read the dust value
delayMicroseconds(40);
digitalWrite(ledP,HIGH); // turn the LED off
delayMicroseconds(9680);
// 0 - 5V mapped to 0 - 1023 integer values
// recover voltage
calcVoltage = voMeasured * (5.0 / 1024.0);
dustDensity = 0.17 * calcVoltage - 0.1;
Serial1.print("Raw Signal Value(0-1023) : ");
Serial1.print(voMeasured);
Serial1.print(" - Voltage: ");