basic motor controller class to be used with the TB6612 motor controller.

Dependents:   mazeSolver

Revision:
0:322cf8e3ef05
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/motor.h	Sun Oct 31 10:44:13 2021 +0000
@@ -0,0 +1,22 @@
+#pragma once
+#include "mbed.h"
+
+
+class motor {
+    DigitalOut dir1_ ; 
+    DigitalOut dir2_ ;
+    PwmOut motorOne_ ;
+    
+    public:
+    
+    
+    
+    motor(PinName dir1, PinName dir2, PinName motorOne);
+    
+    void setSpeed (float speed);
+    
+    motor & operator= (float speed);
+    
+   
+    
+};
\ No newline at end of file