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
- Committer:
- fujikenac
- Date:
- 2017-09-21
- Revision:
- 8:b1464c354ffd
- Parent:
- 7:28a5f822ccd1
- Child:
- 10:1a2fe21bfdb2
File content as of revision 8:b1464c354ffd:
#ifndef mecanum2017_H
#define mecanum2017_H
#include "mbed.h"
#define PI 3.141592654
class mecanum2017
{
private:
T_motor m1, m2, m3, m4;
Timer timer;
float para1, para2, para3, para4;
double alpha, beta, oldangle, sokudo;
public:
mecanum2017(I2C& i2c_, float para[], char addr[], int phase); //paraはモーターの回転方向を±1で表すよ いつもは全部+1だよ
/* うごけー */
void move(int xdate, int ydate); //xdate, ydateは -64 ~ +64
/*かくどー*/
void anglemove(double angle);
/* まわれー */
void rotation(int rxdate);
/* とまれー */
void stop();
/*そのままー*/
void free();
void kasoku();
};
#endif
/*
Motor
\\ 2--------1 //
| |
| |
// 3--------4 \\
*/