テスト

Dependencies:   C12832 USBHost mbed MMA7660 wave_player

Fork of app-board-Speaker by Ryohei Funakoshi

Committer:
chris
Date:
Tue Oct 16 13:26:23 2012 +0000
Revision:
1:0a08d26b011a
Parent:
0:f86c572491c3
Child:
2:cfd337edff08
First commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
chris 0:f86c572491c3 1 #include "mbed.h"
chris 0:f86c572491c3 2
chris 1:0a08d26b011a 3 DigitalIn fire(p14);
chris 1:0a08d26b011a 4 PwmOut spkr(p26);
chris 0:f86c572491c3 5
chris 0:f86c572491c3 6 int main()
chris 0:f86c572491c3 7 {
chris 1:0a08d26b011a 8 for (float i=2000.0; i<10000.0; i+=100) {
chris 1:0a08d26b011a 9 spkr.period(1.0/i);
chris 1:0a08d26b011a 10 spkr=0.5;
chris 1:0a08d26b011a 11 wait(0.1);
chris 0:f86c572491c3 12 }
chris 1:0a08d26b011a 13 spkr=0.0;
chris 1:0a08d26b011a 14 while(!fire) {}
chris 0:f86c572491c3 15 }