top of page
עיצוב אזעקת אש, אזהרה בעת התחממות יתר
1.int buzzer_Pin=3;
2.int sensor_Pin=A0;
3.int sensor_Val;
4.
5.void setup() {
6. // put your setup code here, to run once:
7. pinMode(buzzer_Pin,OUTPUT);
8. Serial.begin(9600);
9.
10.}
11.
12.void loop() {
13. // put your main code here, to run repeatedly:
14. sensor_Val = analogRead (sensor_Pin);
15. Serial.println(sensor_Val);
16. delay(500);
17.if (sensor_Val <=700){
18. tone(buzzer_Pin,1000, 500);
19. delay(500);
20.}


bottom of page