#defineCYTRON_MOTOR_DRIVER_H #include<Arduino.h> #include<stdint.h> enumMODE { PWM_DIR, PWM_PWM, }; classCytronMD { public: CytronMD(MODE mode,uint8_tpin1,uint8_tpin2); voidsetSpeed(int16_tspeed); protected: MODE _mode;
This example only show how to drive a single motor for simplicity. For multi channels motor driver, all channels work the same way. Compatible Motor Drivers: MD10C MD10-POT MD13S MD20A MD25HV MD30C SHIELD-MD10 MDS160A* MDS40B* ...