It is a test program of wallbot mini library.

Dependencies:   mbed wallbotmini

main.cpp

Committer:
jksoft
Date:
2013-11-02
Revision:
0:37a76b1e82dc

File content as of revision 0:37a76b1e82dc:

#include "mbed.h"
#include "wallbotmini.h"

wallbotmini wb;
 
int main() {

    wb.sensor_calibrate();

    while(!wb.GetSw())
    {
        wb.set_led(wb.GetLinePosition());
    }
    
    wb.forward(1.0);
    wait (1.0);
    wb.left(1.0);
    wait (1.0);
    wb.backward(1.0);
    wait (1.0);
    wb.right(1.0);
    wait (1.0);
    
    wb.stop();
    
    while(1);

}