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.
Dependencies: mbed
main.cpp@3:6ab4e8e3aa02, 2016-03-29 (annotated)
- Committer:
- baba2357
- Date:
- Tue Mar 29 12:36:50 2016 +0000
- Revision:
- 3:6ab4e8e3aa02
- Parent:
- 2:bed6b204e64c
- Child:
- 7:4f5cd0051db0
???
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
baba2357 | 1:86d25c1c4bd5 | 1 | #include "mbed.h" |
baba2357 | 1:86d25c1c4bd5 | 2 | #include "pin_file.h" |
baba2357 | 1:86d25c1c4bd5 | 3 | #include "spi_nucleo.h" |
baba2357 | 1:86d25c1c4bd5 | 4 | #include "transfer.h" |
baba2357 | 2:bed6b204e64c | 5 | #include <string.h> |
baba2357 | 2:bed6b204e64c | 6 | |
baba2357 | 1:86d25c1c4bd5 | 7 | |
baba2357 | 1:86d25c1c4bd5 | 8 | int main(){ |
baba2357 | 3:6ab4e8e3aa02 | 9 | transfer(); |
baba2357 | 3:6ab4e8e3aa02 | 10 | spiInit(); |
baba2357 | 3:6ab4e8e3aa02 | 11 | while(pushed_number==0){ //手動 |
baba2357 | 3:6ab4e8e3aa02 | 12 | spi_mbed(); //コントローラーからの信号を読み取る |
baba2357 | 3:6ab4e8e3aa02 | 13 | if(RR==1){ |
baba2357 | 3:6ab4e8e3aa02 | 14 | //右旋回の関数 |
baba2357 | 3:6ab4e8e3aa02 | 15 | } |
baba2357 | 3:6ab4e8e3aa02 | 16 | else if(LR==1){ |
baba2357 | 3:6ab4e8e3aa02 | 17 | //左旋回の関数 |
baba2357 | 3:6ab4e8e3aa02 | 18 | } |
baba2357 | 3:6ab4e8e3aa02 | 19 | else{ |
baba2357 | 3:6ab4e8e3aa02 | 20 | //読み取った値speed_X,speed_Yを速度制御にぶち込む |
baba2357 | 3:6ab4e8e3aa02 | 21 | } |
baba2357 | 1:86d25c1c4bd5 | 22 | } |
baba2357 | 3:6ab4e8e3aa02 | 23 | while(pushed_number==1){ //自動 |
baba2357 | 3:6ab4e8e3aa02 | 24 | getGyro(); |
baba2357 | 3:6ab4e8e3aa02 | 25 | //自己位置 |
baba2357 | 3:6ab4e8e3aa02 | 26 | //エアシリンダー |
baba2357 | 1:86d25c1c4bd5 | 27 | } |
baba2357 | 1:86d25c1c4bd5 | 28 | |
baba2357 | 3:6ab4e8e3aa02 | 29 | } |
baba2357 | 1:86d25c1c4bd5 | 30 |