Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of 5_songs by
Diff: main.cpp
- Revision:
- 9:bf01a27b649f
- Parent:
- 8:77227ecac915
--- a/main.cpp Sat May 21 16:13:12 2016 +0000
+++ b/main.cpp Sat May 21 17:20:54 2016 +0000
@@ -14,7 +14,7 @@
static void play_tone(int tone, int duration) {
int tone_period_us = 1000000/tone;
-/*
+
for (long i = 0; i < duration * 1000L; i += tone_period_us * 2) {
// let's change the buzzer's volume depending on how far we are
@@ -25,7 +25,7 @@
buzzer = 0.0f;
wait_us(tone_period_us);
}
-*/
+/*
#define PI 3.14159265
for (long i = 0; i < duration * 1000L; i += tone_period_us * 2) {
@@ -41,7 +41,7 @@
}
buzzer = 0.0f;
-
+*/
}
static void play_song(int notes_left, int* melody, int* duration) {
