Control of mbed using OSC. Based on code from the Make Controller. Right now you can turn the onboard LEDs on/off and toggle 8 digital out pins. More I/O will be done in the future.
Diff: main.cpp
- Revision:
- 0:439354122597
diff -r 000000000000 -r 439354122597 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Mar 17 03:17:38 2010 +0000 @@ -0,0 +1,31 @@ + +/* +* Pehr Hovey +* mBed OSC +* main.cpp +* control mbed with OSC using mbed's ethernet port and UDP +* +*/ + +#include "mbed.h" + + +extern int osc_init(); +extern void osc_poll(); + +int main() { + + osc_init(); //set everything up + + + //Send a startup packet + printf("mBed OSC Started...\r\n"); + + while(1) { + //Poll OSC to get incoming UDP packets and handle them + osc_poll(); + + //do other things... + wait(0.1); //A little sleep to let Timeout work + } +}