Beep RTTL done.

Dependencies:   beep

main.cpp

Committer:
jurica238814
Date:
2016-09-22
Revision:
1:b8c2672f5bd6
Parent:
0:79fc9d7d880f

File content as of revision 1:b8c2672f5bd6:

 
 #include "mbed.h"
 #include "beep.h"
 #include "acd52832_bsp.h"
 #include "notes.h"
 
 
 Beep buzzer(PIN_BUZZER);
 DigitalOut LED (p26);
 DigitalOut RED (PIN_LED_RED);
   


char *song = "Greensleaves:d=4,o=5,b=140:g,2a#,c6,d.6,8d#6,d6,2c6,a,f.,8g,a,2a#,g,g.,8f,g,2a,f,2d,g,2a#,c6,d.6,8e6,d6,2c6,a,f.,8g,a,a#.,8a,g,f#.,8e,f#,2g";



int main(){
  
  LED = 1;      
  RED = 1;
  buzzer.playRttl(song);
  RED = 0;
  
  while(1){
      LED = 0;
      wait(0.1);
      LED = 1;
      wait(0.1);
      }
}