This library is an attempt to encapsulate the Pololu motor board MC33926 Motor Driver Carrier.
Embed:
(wiki syntax)
Show/hide line numbers
Motor.h
00001 #ifndef MBED_MOTOR_H 00002 #define MBED_MOTOR_H 00003 00004 #include "mbed.h" 00005 00006 class Motor 00007 { 00008 public: 00009 00010 00011 Motor(PinName pwm, PinName dir1, PinName dir2); 00012 00013 float speed(float speed, bool direction); 00014 float speed(float speed); 00015 Motor& operator= (float speed); 00016 00017 00018 protected: 00019 PwmOut _pwm; 00020 DigitalOut _dir1; 00021 DigitalOut _dir2; 00022 bool _direction; 00023 00024 00025 }; 00026 00027 #endif
Generated on Fri Jul 15 2022 02:07:01 by 1.7.2