Freedom Seeed Grove Vibration Example

Dependencies:   mbed

Fork of frdm_Grove_Vibration_Example by Freescale

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 }