25/06/2015
14
sinVal = (sin(x*(3.1412/180)));
15
// generate a frequency from the sin value
16
toneVal = 2000+(int(sinVal*1000));
17
tone(8, toneVal);
18
delay(2);
19
}
20
}
7.Temperature Alarm
?
1
/*
2
Temperature Alarm
3
*/
4
float
sinVal;
5
int
toneVal;
6
unsigned long
tepTimer ;
7
8
void
setup(){
9
pinMode(8, OUTPUT);
10
Serial.begin(9600);
11
}
12
13
void
loop(){
14
int
val;
15
double
data;
16
val=analogRead(0);
http://www.dfrobot.com/wiki/index.php/DFRduino_Beginner_Kit_For_Arduino_V3_SKU:DFR0100
DFRduino Beginner Kit For Arduino V3 SKU:DFR0100 Robot Wiki
9/23
Need help?
Do you have a question about the DFR0100 and is the answer not in the manual?
Questions and answers