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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 DigitalOut vibMotor(D6);
00004 
00005 int main()
00006 {
00007     int timer = 1;
00008     while(1) {
00009         vibMotor = 1;
00010         wait(timer);
00011         vibMotor = 0;
00012         wait(timer);
00013     }
00014 }