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
Fork of circle_war_ver_A_NUCLEO_ by
main.cpp
- Committer:
- baba2357
- Date:
- 2016-04-03
- Revision:
- 8:554e3d643b2d
- Parent:
- 7:4f5cd0051db0
- Child:
- 10:369a9389bb7e
File content as of revision 8:554e3d643b2d:
#include "mbed.h" #include "pin_file.h" #include "spi_nucleo.h" #include "transfer.h" #include <string.h> int main(){ spiInit(); push.mode(PullUp); while(pushed_number==0){ //手動 transfer(); spi_mbed(); //コントローラーからの信号を読み取る Cilinder=cilinder; if(RR==1){ //右旋回の関数 } else if(LR==1){ //左旋回の関数 } else if(onoff==1){ if(updown==1) up=0.1;//上下機構上昇 else down=0.1;//上下機構下降 } else{ //読み取った値speed_X,speed_Yを速度制御にぶち込む } } while(pushed_number==1){ //自動 transfer(); getGyro(); //自己位置 //エアシリンダー } }