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.
Dependencies: mbed
Brobot.h
00001 /* 00002 * Brobot.h 00003 * 00004 */ 00005 00006 #ifndef BROBOT_H_ 00007 #define BROBOT_H_ 00008 00009 #include <cstdlib> 00010 #include <mbed.h> 00011 00012 /** 00013 * This is a device driver class to drive the robot autonomously 00014 */ 00015 class Brobot 00016 { 00017 00018 public: 00019 // constructors have same name as the class 00020 Brobot(PwmOut* left, PwmOut* right, int number); 00021 Brobot(); //empty constructor 00022 00023 00024 // void init(PwmOut* left, PwmOut* right, int number); 00025 void turnleft(); 00026 void turnright(); 00027 void forward(); 00028 void back(); 00029 void stop(); 00030 void slow(float ammount); // ammount is subtracted from current speeds 00031 void rotate(float ammount); // values from -0.5 to 0.5 00032 00033 private: 00034 PwmOut* pwmL; 00035 PwmOut* pwmR; 00036 int number; 00037 }; 00038 00039 #endif /* BROBOT_H_ */
Generated on Wed Jul 13 2022 05:37:58 by
1.7.2