0
Offline
Newbie
Karma: 0
Posts: 15
Arduino rocks
|
 |
« on: December 08, 2009, 03:33:50 am » |
I've been playing around with Recotana's OSC library and came across an issue I'm not sure how to solve. Basically the arduino receives an OSC message something like this:
/dmx/1
and of course the value.
When I use:
recMes.getAddress(1);
it returns the second value with the forward slash like this:
/1
How would I get the 1 by itself without the forward slash. I've tried the wstring library with no luck. Plus that's probably not the most efficient way to do this. Is there anyone familiar with the library that they'd know how to modify the code so recMes.getAddress(1) outputs without the forward slash? I tried to look through it but it all seems a little foreign to me. Thanks.
|
|
|
|
« Last Edit: December 08, 2009, 03:34:13 am by greatwitenorth »
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 15
Arduino rocks
|
 |
« Reply #1 on: December 13, 2009, 12:25:36 am » |
Looks like I solved my own problem. Replace lines 700-711 from the original OSCClass.cpp (v1.0.1) with the code below. This will output the osc messages without the forward slashes.
if(adrCount<MAX_ADDRESS){ //Added this in to remove the slashes out of final output if(d!='/'){ tempAddress[adrCount][adrMesPos]=d; if(packetCount>3) { packetCount=0; packetPos+=4; } adrMesPos++; } } messagePos++; packetCount++;
|
|
|
|
|
Logged
|
|
|
|
|
Los Angeles, CA
Offline
Newbie
Karma: 0
Posts: 11
Arduino Rocks-N-Rolls
|
 |
« Reply #2 on: April 27, 2010, 01:47:37 pm » |
nickv, thanks for replying to your own post;)
im researching all osc arduino options currently and finding open loops all over the last two years.
spacehippy matt pinner
|
|
|
|
|
Logged
|
|
|
|
|
|
|
Los Angeles, CA
Offline
Newbie
Karma: 0
Posts: 11
Arduino Rocks-N-Rolls
|
 |
« Reply #4 on: May 12, 2010, 01:41:28 pm » |
GoodVibrations, this OSCuino looks very promising. I cannot wait to try it out thanks!
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 14
Arduino rocks
|
 |
« Reply #5 on: October 20, 2010, 11:09:43 pm » |
hey guys.. i need some help with this library.. i cant compile it.. no example.. i fix the spi.h problem.. but after that i get a thousand errors... i use arduino 0019
any help would be appreciated
|
|
|
|
|
Logged
|
|
|
|
|
France
Offline
Sr. Member
Karma: 0
Posts: 262
|
 |
« Reply #6 on: October 21, 2010, 01:12:30 am » |
I'm sorry to say that but you probably need to use Arduino 18 (as I do) for the library while waiting for an update.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 14
Arduino rocks
|
 |
« Reply #7 on: October 21, 2010, 01:14:39 am » |
i downloloaded the 17 version and it compiled.. i have the touch osc app on my iphone and cannot find out if something works or not... i'm really noob on the osc part any ideas?
|
|
|
|
|
Logged
|
|
|
|
|
France
Offline
Sr. Member
Karma: 0
Posts: 262
|
 |
« Reply #8 on: October 21, 2010, 01:16:33 am » |
Begin with the examples, modify and put together some to do what you need and you will progressively understand it and be able to do everything by yourself. But take your time. 
|
|
|
|
« Last Edit: October 21, 2010, 01:16:46 am by tep »
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 15
Arduino rocks
|
 |
« Reply #9 on: November 24, 2010, 06:50:20 pm » |
Does anyone know of a working OSC library for the latest arduino release (0021)? If not maybe I'll have to figure out how to write one and see what happens.
|
|
|
|
|
Logged
|
|
|
|
|
France
Offline
Sr. Member
Karma: 0
Posts: 262
|
 |
« Reply #10 on: November 25, 2010, 04:16:10 pm » |
I'm currently using Arduino 018 just for this excellent library, waiting for an update.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 15
Arduino rocks
|
 |
« Reply #11 on: November 26, 2010, 10:32:45 pm » |
|
|
|
|
|
Logged
|
|
|
|
|
|