Kaydet (Commit) cc0fc8c9 authored tarafından Ömer SAVAŞ's avatar Ömer SAVAŞ 💬

Upload New File

üst e762d25a
int sinyal = 7, buzzer = 8, role = 9;
void cal()
{
digitalWrite(role, HIGH);
int t = 500;
for(int i = 0; i< 5; i++)
{
tone(buzzer, t);
delay(100);
t += 40;
noTone(buzzer);
delay(5);
}
noTone(buzzer);
digitalWrite(role, LOW);
/*delay(500);
digitalWrite(role, HIGH);
delay(500);
digitalWrite(role, LOW);*/
}
void setup() {
delay(60000);
pinMode(sinyal, INPUT);
pinMode(buzzer, OUTPUT);
pinMode(role, OUTPUT);
digitalWrite(role, LOW);
}
void loop()
{
if(digitalRead(sinyal))
{
cal();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment