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 MOTOR_H 00002 #define MOTOR_H 00003 00004 #include <mbed.h> 00005 00006 class Motor { 00007 public: 00008 Motor (AnalogOut& motorAccelerator, 00009 AnalogOut& motorBrake, 00010 DigitalOut& keySwitch, 00011 DigitalOut& directionFwd, 00012 DigitalOut& directionRev, 00013 DigitalOut& footSwitch, 00014 DigitalOut& seatSwitch, 00015 DigitalOut& inchFwd, 00016 DigitalOut& speedLimit2, 00017 DigitalOut& speedLimit3); 00018 00019 void turnOn(); 00020 void turnOff(); 00021 void closeDeadman(); 00022 void releaseDeadman(); 00023 void setForward(); 00024 void setPark(); 00025 void setReverse(); 00026 void engage(); 00027 void disengage(); 00028 void setSpeedMode(int speed); 00029 void throttle(float throttleRate); 00030 void brake(float brakeRate); 00031 00032 private: 00033 AnalogOut& _motorAccelerator; 00034 AnalogOut& _motorBrake; 00035 DigitalOut& _keySwitch; 00036 DigitalOut& _directionFwd; 00037 DigitalOut& _directionRev; 00038 DigitalOut& _footSwitch; 00039 DigitalOut& _seatSwitch; 00040 DigitalOut& _inchFwd; 00041 DigitalOut& _speedLimit2; 00042 DigitalOut& _speedLimit3; 00043 }; 00044 00045 #endif
Generated on Thu Jul 28 2022 02:21:05 by
