Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 0:ce9fda861f9e, committed 2013-07-28
- Comitter:
- jksoft
- Date:
- Sun Jul 28 08:21:57 2013 +0000
- Commit message:
- First
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sun Jul 28 08:21:57 2013 +0000 @@ -0,0 +1,33 @@ +#include "mbed.h" +#include "wallbot.h" + +wallbot wb; + +BusOut leds(LED1,LED2,LED3,LED4); + +int main() { + + wait(0.5); + + // Motor test. + wb.forward(0.5); + wait (2.0); + wb.left(0.5); + wait (2.0); + wb.backward(0.5); + wait (2.0); + wb.right(0.5); + wait (2.0); + + wb.stop(); + + // Sensor & Switch test. + while(1) + { + int bit; + wb.GetLinePosition(&bit); + printf("LeftSw:%d RightSw:%d FloorSensor:%X\r\n",wb.GetLeftSw(),wb.GetRightSw(),bit); + leds = bit; + wait(0.1); + } + } \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Jul 28 08:21:57 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/b3110cd2dd17 \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wallbot.lib Sun Jul 28 08:21:57 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/jksoft/code/wallbot/#f8571ffd252a