demo demo / Mbed 2 deprecated BluetoothSumo

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Motor.h Source File

Motor.h

00001 // H-Bridge Motor Control
00002 // Copyright (c) 2009 sford
00003 // Released under the MIT License: http://mbed.org/license/mit
00004 
00005 #ifndef MBED_MOTOR_H
00006 #define MBED_MOTOR_H
00007 
00008 #include "mbed.h"
00009 
00010 class Motor {
00011 public:
00012     Motor(PinName pwm, PinName fwd, PinName rev);
00013     void speed(float);
00014 
00015 protected:
00016     PwmOut _pwm;
00017     DigitalOut _fwd;
00018     DigitalOut _rev;
00019 };
00020 
00021 #endif