Program for testing motion boards (double motor controller)

Dependencies:   mbed

Program to test motion boards (double motor controller).

The mbed board reads from a joystick and then sends the commands to the motor board (l293d), which lets the small caterpillar go ahead, go back and turn.

/media/uploads/mariob/2014-06-14_23.36.59.jpg /media/uploads/mariob/2014-06-14_23.36.46.jpg

Committer:
mariob
Date:
Sat Jun 14 21:56:12 2014 +0000
Revision:
0:5307ae36f268
example to test motion boards

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mariob 0:5307ae36f268 1 #ifndef DC_MOTOR
mariob 0:5307ae36f268 2 #define DC_MOTOR
mariob 0:5307ae36f268 3
mariob 0:5307ae36f268 4 #include "mbed.h"
mariob 0:5307ae36f268 5
mariob 0:5307ae36f268 6 class DC_motor
mariob 0:5307ae36f268 7 {
mariob 0:5307ae36f268 8 PwmOut pwm;
mariob 0:5307ae36f268 9 DigitalOut dir;
mariob 0:5307ae36f268 10
mariob 0:5307ae36f268 11 public:
mariob 0:5307ae36f268 12
mariob 0:5307ae36f268 13 DC_motor (PinName ppwm, PinName pdir);
mariob 0:5307ae36f268 14
mariob 0:5307ae36f268 15 void speed(float speed);
mariob 0:5307ae36f268 16
mariob 0:5307ae36f268 17 };
mariob 0:5307ae36f268 18
mariob 0:5307ae36f268 19 #endif