主にオムニです。

Dependencies:   EC mbed HCSR04

Fork of asimawari by yuto kawamura

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers motor_move.h Source File

motor_move.h

00001 ////////////////モーターの動作////////////////
00002 void motor_act()
00003 {
00004     for(i=0; i<2; i++) {
00005         //絶対値をつける関数
00006         if(M[i]>=0) {
00007             motor[i][0]=M[i];
00008             motor[i][1]=0;
00009         } else {
00010             motor[i][0]=0;
00011             motor[i][1]=-M[i];
00012         }
00013     }
00014 }