change tone sounds by altering the waveforms

Dependencies:   mbed

Fork of 5_songs by MakingMusicWorkshop

Files at this revision

API Documentation at this revision

Comitter:
maclobdell
Date:
Tue May 10 16:49:06 2016 +0000
Parent:
0:0fb17f0d39e7
Child:
2:610196c7b41c
Commit message:
tested, converted to rtos timing, removed code to be added by attendees

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon May 09 19:52:47 2016 +0000
+++ b/main.cpp	Tue May 10 16:49:06 2016 +0000
@@ -1,5 +1,6 @@
 #include "mbed.h"       // this tells us to load mbed  related functions
-#include "tones.h"                   // list of all the tones and their frequencies
+#include "tones.h"      // list of all the tones and their frequencies
+#include "rtos.h"       // using the rtos for timing features.  Just want to block the play_song function until it is time to play the next note.
 
 PwmOut buzzer(D3);                   // our buzzer is a PWM output (pulse-width modulation)
 
@@ -17,11 +18,13 @@
 }
 
 static void play_song(int notes_left, int* melody, int* duration) {
+    
     // YOUR CODE HERE
+        
 }
 
 // this code runs when the microcontroller starts up
-void main() {
+int main() {
     // declare a melody
     int melody[] = {
         NOTE_E4, NOTE_D4, NOTE_C4, NOTE_D4, NOTE_E4, NOTE_E4, NOTE_E4, 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-rtos.lib	Tue May 10 16:49:06 2016 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/mbed_official/code/mbed-rtos/#031a41d65add