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:
- username16248
- Date:
- 2016-04-04
- Revision:
- 11:f8fac9693cd5
- Parent:
- 10:369a9389bb7e
- Child:
- 14:3403ce49a37a
File content as of revision 11:f8fac9693cd5:
#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(); //自己位置 //エアシリンダー } }