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@1:cc63373e84ec, 2017-08-18 (annotated)
- Committer:
- fujikenac
- Date:
- Fri Aug 18 02:07:55 2017 +0000
- Revision:
- 1:cc63373e84ec
- Parent:
- 0:d4e9f39c6086
- Child:
- 3:063d7878f0d1
add free
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 | 0:d4e9f39c6086 | 10 | double alpha, oldangle; |
| fujikenac | 0:d4e9f39c6086 | 11 | public: |
| fujikenac | 0:d4e9f39c6086 | 12 | mecanum2017(I2C& i2c_, char addr1, char addr2, char addr3, char addr4, int phase); |
| fujikenac | 0:d4e9f39c6086 | 13 | |
| fujikenac | 0:d4e9f39c6086 | 14 | /* うごけー */ |
| fujikenac | 0:d4e9f39c6086 | 15 | void move(int xdate, int ydate); //xdate, ydateは -64 ~ +64 |
| fujikenac | 0:d4e9f39c6086 | 16 | |
| fujikenac | 0:d4e9f39c6086 | 17 | /* まわれー */ |
| fujikenac | 0:d4e9f39c6086 | 18 | void rotation(int rxdate); |
| fujikenac | 0:d4e9f39c6086 | 19 | |
| fujikenac | 0:d4e9f39c6086 | 20 | /* とまれー */ |
| fujikenac | 0:d4e9f39c6086 | 21 | void stop(); |
| fujikenac | 1:cc63373e84ec | 22 | |
| fujikenac | 1:cc63373e84ec | 23 | /*そのままー*/ |
| fujikenac | 1:cc63373e84ec | 24 | void free(); |
| fujikenac | 0:d4e9f39c6086 | 25 | }; |
| fujikenac | 1:cc63373e84ec | 26 | #endif |
| fujikenac | 1:cc63373e84ec | 27 | /* |
| fujikenac | 1:cc63373e84ec | 28 | Motor |
| fujikenac | 1:cc63373e84ec | 29 | |
| fujikenac | 1:cc63373e84ec | 30 | \\ 2--------1 // |
| fujikenac | 1:cc63373e84ec | 31 | | | |
| fujikenac | 1:cc63373e84ec | 32 | | | |
| fujikenac | 1:cc63373e84ec | 33 | // 3--------4 \\ |
| fujikenac | 1:cc63373e84ec | 34 | */ |