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 Austin Blackstone

Files at this revision

API Documentation at this revision

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
--- /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);
+    }
+}
--- /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