Need help with Programming please!

My name is Tomás and I’m in electrotechnical engineering. I’m developing a project on a deck for a surfboard for blind people and I’m looking for a code that changes the frequency of a buzzer as if it were an emergency sign, in order for the blind surfer to be able to find the surfboard more easily through the buzzer’s frequency changes. Programming has never been my area, so i can look for some help. I await reply and thanks for the availability.

Can you be more specific about what frequencies, and what pattern of changes?

Typically you would use the tone(pin, frequency, duration) function to play a tone on a buzzer for a specified number of milliseconds. You an use delay(duration) for periods where you don’t want a tone.

https://www.arduino.cc/reference/en/language/functions/advanced-io/tone/

1 Like

Thank you John for the quick reply. Basically it was to control with the exit of the arduino a piezo buzzer of 5V in order to draw the blind person’s attention to the location of the surfboard. I had thought of a frequency change in which the frequency was going down and up in order to create a specie of an alarm.

As John suggested, The tone() function would be fine for this, just put it in a for loop and vary the frequency

1 Like

https://www.google.de/search?q=arduino+sirene

thanks bro. I found it to. very thanks :wink: