![](/media/cache/group/Mbed-100-mk2_WXmQNC1.png.50x50_q85.png)
BusInOut Hello World
Dependencies: mbed
Fork of BusInOut_HelloWorld by
Revision 1:075e57eccf3a, committed 2013-02-12
- Comitter:
- stevep
- Date:
- Tue Feb 12 11:59:55 2013 +0000
- Parent:
- 0:91a6f3d1b2f0
- Commit message:
- Put example in a loop
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Feb 12 11:26:02 2013 +0000 +++ b/main.cpp Tue Feb 12 11:59:55 2013 +0000 @@ -1,14 +1,16 @@ -#include "mbed.h" - -BusInOut pins(p5, p10, p7); - -int main() { - pins.output(); - pins = 0x3; - wait(1); - pins.input(); - wait(1); - if(pins == 0x6) { - printf("Hello!\n"); - } +#include "mbed.h" + +BusInOut pins(p5, p10, p7); + +int main() { + while(1) { + pins.output(); + pins = 0x3; + wait(1); + pins.input(); + wait(1); + if(pins == 0x6) { + printf("Hello!\n"); + } + } } \ No newline at end of file