Chris Styles
/
m3pi_USBSerialRPC
Program to show how to drive the m3pi using RPC commands over the serial port
main.cpp@4:291770676b56, 2011-05-12 (annotated)
- Committer:
- chris
- Date:
- Thu May 12 15:29:39 2011 +0000
- Revision:
- 4:291770676b56
- Parent:
- 2:1f604c2aa261
Updated to the newest m3pi library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
chris | 0:3d8772528bc7 | 1 | #include "mbed.h" |
chris | 0:3d8772528bc7 | 2 | #include "m3pi.h" |
chris | 0:3d8772528bc7 | 3 | #include "SerialRPCInterface.h" |
chris | 0:3d8772528bc7 | 4 | |
chris | 0:3d8772528bc7 | 5 | SerialRPCInterface Interface(USBTX, USBRX); // defaults to 9600 |
chris | 4:291770676b56 | 6 | m3pi m3pi; |
chris | 0:3d8772528bc7 | 7 | |
chris | 0:3d8772528bc7 | 8 | int main() { |
chris | 0:3d8772528bc7 | 9 | |
chris | 1:8828d71a0cc2 | 10 | m3pi.locate(0,1); |
chris | 1:8828d71a0cc2 | 11 | m3pi.printf("USB RPC"); |
chris | 0:3d8772528bc7 | 12 | |
chris | 0:3d8772528bc7 | 13 | // do nothing, just wait for RPC comands over USB |
chris | 0:3d8772528bc7 | 14 | while (1) {} |
chris | 0:3d8772528bc7 | 15 | } |