Bzzer_HelloWorld Example for WIZwiki-W7500
Dependencies: mbed
Diff: main.cpp
- Revision:
- 5:de0ba139a472
- Parent:
- 4:2821beb9bfc8
- Child:
- 6:b6113cd596c0
- Child:
- 8:ebfa804378a5
--- a/main.cpp Wed Jan 06 23:57:27 2016 +0000 +++ b/main.cpp Wed Feb 03 07:40:07 2016 +0000 @@ -109,7 +109,7 @@ for(i=0; i<tones_num; i++) { - Auto_tunes(Buzzer, tones_airplane[i]); // can change tones_airplane[i] -> tones_achool[i] + Auto_tunes(Buzzer, tones_airplane[i]); // User can change tones_airplane[i] -> tones_achool[i] Stop_tunes(Buzzer); } } @@ -122,9 +122,9 @@ void Tune(PwmOut name, int period) { name.period_us(period); - name.write(0.50f); // 50% duty cycle - wait(1); // 1 beat - name.period_us(0); // Sound off + name.write(0.50f); // 50% duty cycle + wait(1); // 1 beat + name.period_us(0); // Sound off } /** @@ -135,8 +135,8 @@ void Auto_tunes(PwmOut name, int period) { name.period_us(period); - name.write(0.50f); // 50% duty cycle - wait_ms(250); // 1/4 beat + name.write(0.50f); // 50% duty cycle + wait_ms(250); // 1/4 beat } /**