Untitled
Anonymous
csharp
10/28/2022 10:26 AM
356 B
21
Indexable
if (beforeCm != 0) {
if (beforeCm > distancia && beforeCm - distancia > 10) {
tone(buzzer,440);
} else if(beforeCm < distancia && distancia - beforeCm > 10) {
tone(buzzer,220);
}
}
beforeCm = distancia;
delay(1000);
noTone(buzzer);Editor is loading...