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.
mecanum2017.h
00001 #ifndef mecanum2017_H 00002 #define mecanum2017_H 00003 #include "mbed.h" 00004 #define PI 3.141592654 00005 00006 class mecanum2017 00007 { 00008 private: 00009 T_motor m1, m2, m3, m4; 00010 Timer timer; 00011 float para1, para2, para3, para4; 00012 double alpha, beta, oldangle, sokudo; 00013 public: 00014 mecanum2017(I2C* i2c_, float para[], char addr[], int phase); //paraはモーターの回転方向を±1で表すよ いつもは全部+1だよ 00015 00016 /* うごけー */ 00017 void move(int xdate, int ydate); //xdate, ydateは -64 ~ +64 00018 00019 /*かくどー*/ 00020 void anglemove(double angle); 00021 00022 /* まわれー */ 00023 void rotation(int rxdate); 00024 00025 /* とまれー */ 00026 void stop(); 00027 00028 /*そのままー*/ 00029 void free(); 00030 00031 void kasoku(); 00032 }; 00033 #endif 00034 /* 00035 Motor 00036 00037 \\ 2--------1 // 00038 | | 00039 | | 00040 // 3--------4 \\ 00041 */
Generated on Wed Jul 20 2022 06:16:02 by
