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

Dependents:   mazeSolver

motor.h

Committer:
snapo
Date:
2021-10-31
Revision:
0:322cf8e3ef05

File content as of revision 0:322cf8e3ef05:

#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);
    
   
    
};