Testing of reflection sensor query

Dependencies:   Test_motor mbed

test_motor.cpp

Committer:
bayagich
Date:
2014-05-20
Revision:
1:5de755abb8d3
Parent:
main.cpp@ 0:fb7117213e54

File content as of revision 1:5de755abb8d3:

/*
#include "mbed.h"
#include "m3pi_ng.h"

DigitalOut myled(LED1);

m3pi george;

int main() {
    
    //MOTOR TEST 

    //left motor test 
    for(int i = 0; i < 1000; ++i){
        george.left_motor(0.3);
    }
    george.stop(); 
    wait(3);  
    
    for(int i = 0; i < 1000; ++i){
        george.left_motor(-0.3);
    }
    george.stop();  
    wait(3); 
    
    
    //right motor test 
    for(int i = 0; i < 1000; ++i){
        george.right_motor(0.3);
    } 
    george.stop(); 
    wait(3); 
    
    for(int i = 0; i < 1000; ++i){
        george.right_motor(-0.3);
    } 
    george.stop(); 
    wait(3); 
    //testing limits 
    
    //left motor test 
     
    for(int i = 0; i < 1000; ++i){
        george.left_motor(1);
    }
    george.stop(); 
    wait(3); 
    
    for(int i = 0; i < 1000; ++i){
        george.left_motor(-1);
    } 
    george.stop(); 
    wait(3); 
    
    //right motor test 
    for(int i = 0; i < 1000; ++i){
        george.right_motor(1);
    } 
    george.stop(); 
    wait(3); 
    
    for(int i = 0; i < 1000; ++i){
        george.right_motor(-1);
    }
    george.stop(); 
    wait(3); 
    
    for(int i = 0; i < 1000; ++i){
        george.right_motor(0);
    }
    george.stop(); 
    wait(3); 
}
*/