Hi guys I'm finally getting somewhere with my Arduino OSC project, Basically I'm trying to make a handset which when buttons are pressed OSC commands are sent so that I don't need to use TouchOSC and I have something more tactile.
I've made a little test sketch and Currently I can connect to the Wifi and broadcast OSC messages.
Using an OSC monitor I can seeing the messages on my laptop however I need to send a float value which isn't working, can someone help me with this?
The correct formatting using the TouchOSC remote is:
"/Hardware/Enter/4 1.000 (float)"
"/Hardware/Enter/4 0.000 (float)"
When sent from the Arduino The OSC monitor is seeing no float value:
"/Hardware/Enter/4"
"/Hardware/Enter/4"
I tried to add float data (Commented out below) and the OSC Monitor saw this:
"/Hardware/Enter/4 (typed)"
"/Hardware/Enter/4 (typed)"
I'm using the esp OSC Librabry from GitHub - sandeepmistry/esp8266-OSC: OSC: Arduino and Teensy implementation of OSC encoding esp8266-OSC Library and I've read here about sending the message including the float value but I'm probably missing something. http://cnmat.berkeley.edu/library/oscuino/omessage
Here is my Void Loop:
void loop(){
//Press Enter Key 3
OSCMessage msgOUT("/Hardware/Enter/4");
//msgOUT.add(1.000); // Float Data
//msgOUT.getFloat(0);
Udp.beginPacket(Udp.remoteIP(), destPort);
msgOUT.send(Udp); // send the bytes
Udp.endPacket(); // mark the end of the OSC Packet
msgOUT.empty(); // free space occupied by message
Serial.println("Press Enter 4");
delay(50);
//Release Enter Key 3
OSCMessage msgOUTr("/Hardware/Enter/4");
//msgOUTr.add(0.000); // Float Data
//msgOUTr.getFloat(0);
Udp.beginPacket(Udp.remoteIP(), destPort);
msgOUTr.send(Udp); // send the bytes
Udp.endPacket(); // mark the end of the OSC Packet
msgOUTr.empty(); // free space occupied by message
Serial.println("Release Enter 4");
delay(5000);
}
Any Help would be much appreciated!
Thanks
Tim