Pehr Hovey / Mbed 2 deprecated mbed_osc

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 
00002 /*
00003 * Pehr Hovey
00004 * mBed OSC
00005 * main.cpp
00006 * control mbed with OSC using mbed's ethernet port and UDP
00007 *
00008 */
00009 
00010 #include "mbed.h"
00011 
00012 
00013 extern int osc_init();
00014 extern void osc_poll();
00015 
00016 int main() {
00017 
00018   osc_init(); //set everything up
00019 
00020 
00021    //Send a startup packet
00022    printf("mBed OSC Started...\r\n");
00023 
00024     while(1) {
00025         //Poll OSC to get incoming UDP packets and handle them
00026         osc_poll();
00027 
00028         //do other things...
00029         wait(0.1); //A little sleep to let Timeout work
00030     }
00031 }