L298 Shild Drive Motor 4A

Fork of ArduMotoShield by Didier Donsez

Committer:
NorNick
Date:
Fri Dec 04 19:23:37 2015 +0000
Revision:
1:b4604cdd9597
Parent:
0:72e45c332025
Chang DigitalOut -> BusOut

Who changed what in which revision?

UserRevisionLine numberNew contents of line
donsez 0:72e45c332025 1 /*
donsez 0:72e45c332025 2 Simple library for the SparkFun Ardumoto Shield https://www.sparkfun.com/products/9815
donsez 0:72e45c332025 3 with the ST Nucleo F401RE
donsez 0:72e45c332025 4
donsez 0:72e45c332025 5 The SparkFun Ardumoto shield can control two DC motors (up to 2 amps per motor). It is based on the L298 H-bridge.
donsez 0:72e45c332025 6
donsez 0:72e45c332025 7 Developped by : Didier Donsez & Jérome Maisonnasse
donsez 0:72e45c332025 8
donsez 0:72e45c332025 9 License: CC-SA 3.0, feel free to use this code however you'd like.
donsez 0:72e45c332025 10 Please improve upon it! Let me know how you've made it better.
donsez 0:72e45c332025 11
donsez 0:72e45c332025 12 This is really simple example code to get you some basic functionality with the Ardumoto Shield.
donsez 0:72e45c332025 13
donsez 0:72e45c332025 14 */
donsez 0:72e45c332025 15
donsez 0:72e45c332025 16
donsez 0:72e45c332025 17 #ifndef MBED_ARDUMOTOSHIELD_H
donsez 0:72e45c332025 18 #define MBED_ARDUMOTOSHIELD_H
donsez 0:72e45c332025 19
donsez 0:72e45c332025 20 #include "mbed.h"
donsez 0:72e45c332025 21
donsez 0:72e45c332025 22 class ArduMotoShield {
donsez 0:72e45c332025 23 public:
donsez 0:72e45c332025 24 static void setVoltages(float vin, float vmaxmotor);
donsez 0:72e45c332025 25
donsez 0:72e45c332025 26 static void stop();
donsez 0:72e45c332025 27 static void forward();
donsez 0:72e45c332025 28 static void backward();
donsez 0:72e45c332025 29 static void left();
donsez 0:72e45c332025 30 static void right();
donsez 0:72e45c332025 31 private:
donsez 0:72e45c332025 32 static void setup();
donsez 0:72e45c332025 33 };
donsez 0:72e45c332025 34
donsez 0:72e45c332025 35 #endif