its a template, it uses public code
Dependencies: Glue MODSERIAL Scissors m3pi mbed
main.cpp@2:db4f4bf756b9, 2013-07-15 (annotated)
- Committer:
- hex705
- Date:
- Mon Jul 15 12:24:45 2013 +0000
- Revision:
- 2:db4f4bf756b9
- Parent:
- 1:71777756a0c2
basic temp for this project --
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hex705 | 0:29d58b75e636 | 1 | #include "mbed.h" |
hex705 | 1:71777756a0c2 | 2 | #include "m3pi.h" |
hex705 | 0:29d58b75e636 | 3 | |
hex705 | 1:71777756a0c2 | 4 | #include "MODSERIAL.h" |
hex705 | 1:71777756a0c2 | 5 | #include "Scissors.h" |
hex705 | 1:71777756a0c2 | 6 | #include "Glue.h" |
hex705 | 1:71777756a0c2 | 7 | |
hex705 | 0:29d58b75e636 | 8 | |
hex705 | 2:db4f4bf756b9 | 9 | |
hex705 | 2:db4f4bf756b9 | 10 | Serial pc(USBTX, USBRX); // tx, rx |
hex705 | 2:db4f4bf756b9 | 11 | MODSERIAL xBee( p28 , p27 ); // tx, rx |
hex705 | 2:db4f4bf756b9 | 12 | MODSERIAL pi ( p9, p10 ); // tx, rx --> connect to 3pi base |
hex705 | 2:db4f4bf756b9 | 13 | |
hex705 | 2:db4f4bf756b9 | 14 | // need to set up the call back so that mBed can buffer messages -- need one on each port |
hex705 | 2:db4f4bf756b9 | 15 | // one copy of scissors should suffice. |
hex705 | 2:db4f4bf756b9 | 16 | |
hex705 | 2:db4f4bf756b9 | 17 | |
hex705 | 2:db4f4bf756b9 | 18 | Scissors s; |
hex705 | 2:db4f4bf756b9 | 19 | Glue g; |
hex705 | 2:db4f4bf756b9 | 20 | |
hex705 | 2:db4f4bf756b9 | 21 | |
hex705 | 2:db4f4bf756b9 | 22 | |
hex705 | 1:71777756a0c2 | 23 | void loop ( void ); |
hex705 | 1:71777756a0c2 | 24 | |
hex705 | 1:71777756a0c2 | 25 | void main () { |
hex705 | 1:71777756a0c2 | 26 | |
hex705 | 0:29d58b75e636 | 27 | while(1) { |
hex705 | 1:71777756a0c2 | 28 | loop (); |
hex705 | 0:29d58b75e636 | 29 | } |
hex705 | 1:71777756a0c2 | 30 | |
hex705 | 1:71777756a0c2 | 31 | } // end main |
hex705 | 1:71777756a0c2 | 32 | |
hex705 | 1:71777756a0c2 | 33 | |
hex705 | 1:71777756a0c2 | 34 | void loop () { |
hex705 | 1:71777756a0c2 | 35 | |
hex705 | 0:29d58b75e636 | 36 | } |
hex705 | 1:71777756a0c2 | 37 | |
hex705 | 1:71777756a0c2 | 38 | |
hex705 | 1:71777756a0c2 | 39 |