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@4:d4c2e7addc77, 2017-08-19 (annotated)
- Committer:
- fujikenac
- Date:
- Sat Aug 19 00:21:07 2017 +0000
- Revision:
- 4:d4c2e7addc77
- Parent:
- 3:063d7878f0d1
- Child:
- 6:cf7de545bef9
change para[], addr[]
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| fujikenac | 0:d4e9f39c6086 | 1 | #ifndef mecanum2017_H |
| fujikenac | 0:d4e9f39c6086 | 2 | #define mecanum2017_H |
| fujikenac | 0:d4e9f39c6086 | 3 | #include "mbed.h" |
| fujikenac | 0:d4e9f39c6086 | 4 | #define PI 3.141592654 |
| fujikenac | 0:d4e9f39c6086 | 5 | |
| fujikenac | 0:d4e9f39c6086 | 6 | class mecanum2017 |
| fujikenac | 0:d4e9f39c6086 | 7 | { |
| fujikenac | 0:d4e9f39c6086 | 8 | private: |
| fujikenac | 0:d4e9f39c6086 | 9 | T_motor m1, m2, m3, m4; |
| fujikenac | 3:063d7878f0d1 | 10 | short para1, para2, para3, para4; |
| fujikenac | 3:063d7878f0d1 | 11 | double alpha, beta, oldangle; |
| fujikenac | 0:d4e9f39c6086 | 12 | public: |
| fujikenac | 4:d4c2e7addc77 | 13 | mecanum2017(I2C& i2c_, short para[], char addr[], int phase); //paraはモーターの回転方向を±1で表すよ いつもは全部+1だよ |
| fujikenac | 0:d4e9f39c6086 | 14 | |
| fujikenac | 0:d4e9f39c6086 | 15 | /* うごけー */ |
| fujikenac | 0:d4e9f39c6086 | 16 | void move(int xdate, int ydate); //xdate, ydateは -64 ~ +64 |
| fujikenac | 0:d4e9f39c6086 | 17 | |
| fujikenac | 3:063d7878f0d1 | 18 | /*かくどー*/ |
| fujikenac | 3:063d7878f0d1 | 19 | void anglemove(double angle); |
| fujikenac | 3:063d7878f0d1 | 20 | |
| fujikenac | 0:d4e9f39c6086 | 21 | /* まわれー */ |
| fujikenac | 0:d4e9f39c6086 | 22 | void rotation(int rxdate); |
| fujikenac | 0:d4e9f39c6086 | 23 | |
| fujikenac | 0:d4e9f39c6086 | 24 | /* とまれー */ |
| fujikenac | 0:d4e9f39c6086 | 25 | void stop(); |
| fujikenac | 1:cc63373e84ec | 26 | |
| fujikenac | 1:cc63373e84ec | 27 | /*そのままー*/ |
| fujikenac | 1:cc63373e84ec | 28 | void free(); |
| fujikenac | 0:d4e9f39c6086 | 29 | }; |
| fujikenac | 1:cc63373e84ec | 30 | #endif |
| fujikenac | 1:cc63373e84ec | 31 | /* |
| fujikenac | 1:cc63373e84ec | 32 | Motor |
| fujikenac | 1:cc63373e84ec | 33 | |
| fujikenac | 1:cc63373e84ec | 34 | \\ 2--------1 // |
| fujikenac | 1:cc63373e84ec | 35 | | | |
| fujikenac | 1:cc63373e84ec | 36 | | | |
| fujikenac | 1:cc63373e84ec | 37 | // 3--------4 \\ |
| fujikenac | 1:cc63373e84ec | 38 | */ |