Simple DC motor control commands for driving DC motor conroller with PWM and up to 2 direction signals (complementary). Takes float value from -1.0 to 1.0.

Dependents:   Teensy_Mot_QEI_Ser_20180111 Axis Axis_20181108 Axis_version2

Fork of MotCon by Joseph Bradshaw

Overloaded class that takes a pwm motor control pin and one or two direction pins for driving DC motors with a variety of motor control IC's. Tested examples include the LM298, TD340, MC33926, A3949.

Files at this revision

API Documentation at this revision

Comitter:
jebradshaw
Date:
Tue Nov 15 15:40:19 2016 +0000
Parent:
5:3e07f69d8abd
Commit message:
Overloaded class for using one or two direction pins on motor driver IC with PWM control

Changed in this revision

MotCon.h Show annotated file Show diff for this revision Revisions of this file
diff -r 3e07f69d8abd -r 709761ee0a14 MotCon.h
--- a/MotCon.h	Tue Oct 18 11:32:36 2016 +0000
+++ b/MotCon.h	Tue Nov 15 15:40:19 2016 +0000
@@ -57,7 +57,7 @@
     void mot_control(float dc);
     void mot_control(float dc, int invert);
     
-    void setMode(int mode);
+    void setMode(bool mode);
     bool getMode(void);
     bool mc_mode;
 private: