i want to do similar thing but for making the sensor a switch to off the buzzer , here is the project i am working on .
i want to add an ultrasonic sensor at the receiver end and when the transmitter triggers the alarm i want the buzzer to go on until someone stop it using the ultrasonic sensor [ more like switch off ]
here is the code for receiver , but i need the code to stop the buzzer at the end of the [full code ]
here --- if(buf == 'a' &&) {
- digitalWrite(led, LOW);*
- digitalWrite(speaker, LOW);*
}
what i will write after && and where do i need to change inside the code ??
i have already removed (time) to make the buzzer always on but need the rest of it
R2.txt (1.37 KB)