めいん

Dependencies:   mbed

main.cpp

Committer:
choutin
Date:
2016-09-01
Revision:
3:3a1b0dda8c6c
Parent:
1:a1e592eca305

File content as of revision 3:3a1b0dda8c6c:

//受渡前での妨害に対応したい
#include"header.h"
Serial pc(SERIAL_TX, SERIAL_RX);

int main() {
    initencorder();
    initmotor();
    
    
    
    move(31,29);
    update(-right.getPulses(), left.getPulses());
    pc.printf("r:%d, l:%d, x:%d y:%d t:%f \n\r",right.getPulses(), left.getPulses(),x,y,theta*180/PI);
    while(1){
        if(coordinateX()>300){move(0,0);}
    }
    
}