春ロボ 2班 2017
/
asimawari
主にオムニです。
Fork of asimawari by
Diff: ACT/motor_move.h
- Revision:
- 2:0a99389df632
- Parent:
- 0:1787ed4e6e61
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ACT/motor_move.h Wed Oct 25 08:54:30 2017 +0000 @@ -0,0 +1,14 @@ +////////////////モーターの動作//////////////// +void motor_act() +{ + for(i=0; i<2; i++) { + //絶対値をつける関数 + if(M[i]>=0) { + motor[i][0]=M[i]; + motor[i][1]=0; + } else { + motor[i][0]=0; + motor[i][1]=-M[i]; + } + } +} \ No newline at end of file