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
Revision 0:c2c4143452b4, committed 2014-09-04
- Comitter:
- mbedAustin
- Date:
- Thu Sep 04 03:29:35 2014 +0000
- Commit message:
- Grove Vibration Motor example application. Vibration duty cycle is 1second, this is the minimum required to make the motor vibrate on both 3.3 and 5v
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
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); + } +}
diff -r 000000000000 -r c2c4143452b4 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Sep 04 03:29:35 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9327015d4013 \ No newline at end of file