
Example program to do a frequency sweep on the speaker
Fork of app-board-Speaker by
Diff: main.cpp
- Revision:
- 3:3bb3e6051175
- Parent:
- 2:cfd337edff08
diff -r cfd337edff08 -r 3bb3e6051175 main.cpp --- a/main.cpp Thu Oct 25 12:25:00 2012 +0000 +++ b/main.cpp Thu Feb 06 15:49:16 2014 +0000 @@ -1,7 +1,7 @@ #include "mbed.h" -DigitalIn fire(p14); -PwmOut spkr(p26); +DigitalIn fire(D4); +PwmOut spkr(D6); int main() { @@ -9,7 +9,7 @@ for (float i=2000.0; i<10000.0; i+=100) { spkr.period(1.0/i); spkr=0.5; - wait(0.1); + wait(0.02); } spkr=0.0; while(!fire) {}