Ilya Khorosh
/
Lab3_Controller
Controller code
Revision 0:b1f3cd059526, committed 2011-10-13
- Comitter:
- ikhorosh
- Date:
- Thu Oct 13 03:07:38 2011 +0000
- Commit message:
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Oct 13 03:07:38 2011 +0000 @@ -0,0 +1,28 @@ +#include "mbed.h" + +Serial xbee1(p9, p10); +DigitalOut rst1(p11); +DigitalOut led1(LED1); +Serial pc(USBTX, USBRX); +AnalogIn slider(p15); + +int main() { + rst1 = 0; //Set reset pin to 0 + + wait(.5); + rst1 = 1; //Set reset pin to 1 + + wait(.5); + led1 = 1; + pc.printf("starting trans"); + + char y = 0; + + while (1) { + wait(1); + y+=10; + xbee1.putc(slider*100); //XBee write + pc.printf("%d", y); + led1 = !led1; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Oct 13 03:07:38 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912