Code for our FYDP -only one IMU works right now -RTOS is working
Embed:
(wiki syntax)
Show/hide line numbers
motors.h
00001 #ifndef MOTORS_H 00002 #define MOTORS_H 00003 00004 #include "mbed.h" 00005 #include "TB6612.h" 00006 00007 class Motors 00008 { 00009 private: 00010 00011 void stop(void const *args); 00012 00013 public: 00014 00015 TB6612 * Left; 00016 TB6612 * Right; 00017 DigitalOut enable; 00018 00019 Motors(TB6612 * L, TB6612 * R, PinName STBY); 00020 00021 void flip(); 00022 void reverse(bool m); //reverse one of the motors (0=right, 1=left) 00023 }; 00024 #endif
Generated on Wed Jul 13 2022 10:32:23 by 1.7.2