projet ghostbuzzter
Dependencies: mbed Random HMC5883L Buzzer
Diff: main_test_buzzer.cpp
- Revision:
- 2:780472a0cfaf
- Parent:
- 1:6e74ea075482
diff -r 6e74ea075482 -r 780472a0cfaf main_test_buzzer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main_test_buzzer.cpp Sun Dec 22 11:34:06 2019 +0000 @@ -0,0 +1,24 @@ +#include "mbed.h" +#include "HMC5883L.h" +#include "Buzzer.h" + +int main() +{ + Buzzer buzz(p8); + buzz.definirPeriode(0.00025); + buzz.demarrer(); + wait(2); + buzz.definirPeriode(0.0025); + buzz.demarrer(); + wait(2); + buzz.definirPeriode(0.025); + buzz.demarrer(); + wait(2); + buzz.changerPeriode(0.25); + wait(2); + buzz.changerPeriode(2.5); + while(1) + { + + } +}