Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Motor.h
00001 #ifndef MBED_MOTOR_H 00002 #define MBED_MOTOR_H 00003 00004 #include "mbed.h" 00005 00006 #define FORWARD 'f' 00007 #define BACKWARD 'b' 00008 #define BREAK 's' 00009 00010 class Motor 00011 { 00012 private: 00013 PwmOut IN1_, IN2_; 00014 DigitalOut INH1_, INH2_; 00015 00016 public: 00017 Motor(PinName IN1, PinName IN2,PinName INH1, PinName INH2); 00018 00019 void setSpeed_percent(float percent, char direction); 00020 }; 00021 00022 #endif
Generated on Wed Jul 27 2022 20:12:06 by
