Instructions
25/06/2015 DFRduinoBeginnerKitForArduinoV3SKU:DFR0100RobotWiki
http://www.dfrobot.com/wiki/index.php/DFRduino_Beginner_Kit_For_Arduino_V3_SKU:DFR0100 10/23
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
data=(double)val*(5/10.24);//convertthevoltagetotemperture
if(data>27){//Ifthetempertureisover27degree,buzzerwillalarm.
for(intx=0;x<180;x++){
sinVal=(sin(x*(3.1412/180)));
toneVal=2000+(int(sinVal*1000));
tone(8,toneVal);
delay(2);
}
}else{//Ifthetemperturnisbelow27degree,buzzerwillnotalarm
noTone(8);
}
if(millis()‐tepTimer>500){//outputthetemperturevalueper500ms
tepTimer=millis();
Serial.print("temperature:");
Serial.print(data);
Serial.println("C");
}
}
8.Detectingvibration
?