User manual
IDUINO for maker’s life
www.openplatform.cc
PinOut
Pin
Description
Vcc
Power supply 5V/DC
Gnd
Ground
D0
Digital Output pin
Example
In this example, we use the digital output pin D13 to sense the change of environment
gas concentration. When the gas concentration arrive at some level, the buzzer is ring.
Wire connection as below:
Vcc-------------5V
Gnd-------------Gnd
D0--------------A0
********Code Begin*********
const int sensorPin= 0;
const int buzzerPin= 13;
int smoke_level;
void setup() {
Serial.begin(9600);
pinMode(sensorPin, INPUT);
pinMode(buzzerPin, OUTPUT);
}
void loop() {
smoke_level= analogRead(sensorPin);
Serial.println(smoke_level);
if(smoke_level > 200){
digitalWrite(buzzerPin, HIGH);
}
else{
digitalWrite(buzzerPin, LOW);
}
}
********Code End*********