oscuinoSerial on Arduino

Hi! I’m trying to sent OSC message from Arduino (http://cnmat.berkeley.edu/book/export/html/11389) and receive in oF using simple received example.
In Arduino i have this code:

#include <SPI.h>     
#include <Ethernet.h>
#include <EthernetUdp.h> 
#include <OSCMessage.h>

byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };  
byte ip[]  = {192, 168, 0, 10 };  
byte outIp[] =  {192, 168, 0, 7 };  
int  outPort = 12345;  
EthernetUDP Udp;

void setup() {
  Ethernet.begin(mac,ip);
}

void loop() {
//the message wants an OSC address as first argument
  OSCMessage msg("/analog/0");
  msg.add(analogRead(0));

  Udp.beginPacket(outIp, outPort);
  msg.send(Udp); // send the bytes to the SLIP stream
  Udp.endPacket(); // mark the end of the OSC Packet
  msg.empty(); // free space occupied by message

  delay(20);
}

I’m connected by ethernet shield and in my ethernet settings i set my ip to “192.168.0.7”.
I don’t receive anything in oF but i really don’t understand where could be the problem.
Any idea? Somebody have already used oscuino?

Thanks!

Hello Mauro,
you need to initialise Udp. Just add the following line to your setup and it should be fine.

Udp.begin(localPort);

http://arduino.cc/en/pmwiki.php?n=Reference/EthernetUDPBegin
I would also suggest working with the example on github. They are more up to date.

Thomas