Seeed Grove Vibration motor example application. Digital Output with busy wait PWM, 1 second duty cycle.
Dependencies: mbed
Fork of Seeed_Grove_Vibration_Motor_Example by
Diff: main.cpp
- Revision:
- 0:c2c4143452b4
diff -r 000000000000 -r c2c4143452b4 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Sep 04 03:29:35 2014 +0000 @@ -0,0 +1,14 @@ +#include "mbed.h" + +DigitalOut vibMotor(D6); + +int main() +{ + int timer = 1; + while(1) { + vibMotor = 1; + wait(timer); + vibMotor = 0; + wait(timer); + } +}