Go Down

Topic: Beep Sound (Read 1 time) previous topic - next topic


I want to make a beep sound with arduino that sounds like the heart monitors at hospitals. I have this code but i dont know what i need to change to make it sound like that.
Code: [Select]
int speaker = 4;

void setup() {
 pinMode(speaker, OUTPUT);

void loop() {
 for (int i=0; i<30; i++) {
   digitalWrite(speaker, HIGH);
   digitalWrite(speaker, LOW);

Here example sound: http://www.youtube.com/watch?v=eQVaLWMPXHk

THX in advance!



Frequency of beep, length of beep, and time between beeps.  It's then just a loop.

My hardware: Arduino, Teensy 2.0, Teensy 3.2 & custom ATmega328 systems
My libraries: NewPing, LCDBitmap, toneAC, toneAC2, NewTone, TimerFreeTone
My projects: http://www.DogBlocker.com/
My beer: Great Lakes Brewing Co. Lake Erie Monster


toneAC seems great, i will test it out! thx

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131