Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example "SimpleSend" does not work #6

Open
CaseyJScalf opened this issue Jul 11, 2015 · 3 comments
Open

Example "SimpleSend" does not work #6

CaseyJScalf opened this issue Jul 11, 2015 · 3 comments

Comments

@CaseyJScalf
Copy link

I tried this sketch to see if I could finally find a working arduino/Processing library and got this when I tried to compile.

Not sure if that's normal. Going to keep looking. Thanks for trying.

In file included from /Users/Lotus/Desktop/All Others/Workbench/Arduino/libraries/ArdOSC/OSCCommon/OSCClient.h:21:0,
from /Users/Lotus/Desktop/All Others/Workbench/Arduino/libraries/ArdOSC/ArdOSC.h:55,
from OSC_simplesend.ino:4:
/Users/Lotus/Desktop/All Others/Workbench/Arduino/libraries/ArdOSC/OSCCommon/OSCEncoder.h:27:33: error: 'OSCMessage::OSCMessage' is not a type
int16_t encode( OSCMessage::OSCMessage *mes ,uint8_t *_binData );
^
In file included from /Users/Lotus/Desktop/All Others/Workbench/Arduino/libraries/ArdOSC/ArdOSC.h:55:0,
from OSC_simplesend.ino:4:
/Users/Lotus/Desktop/All Others/Workbench/Arduino/libraries/ArdOSC/OSCCommon/OSCClient.h:36:5: error: 'OSCEncoder::OSCEncoder' names the constructor, not the type
OSCEncoder::OSCEncoder encoder;
^
In file included from /Users/Lotus/Desktop/All Others/Workbench/Arduino/libraries/ArdOSC/OSCCommon/OSCServer.h:19:0,
from /Users/Lotus/Desktop/All Others/Workbench/Arduino/libraries/ArdOSC/ArdOSC.h:56,
from OSC_simplesend.ino:4:
/Users/Lotus/Desktop/All Others/Workbench/Arduino/libraries/ArdOSC/OSCCommon/OSCDecoder.h:26:30: error: 'OSCMessage::OSCMessage' is not a type
int16_t decode( OSCMessage::OSCMessage *_mes ,const uint8_t *_binData );
^
In file included from /Users/Lotus/Desktop/All Others/Workbench/Arduino/libraries/ArdOSC/ArdOSC.h:56:0,
from OSC_simplesend.ino:4:
/Users/Lotus/Desktop/All Others/Workbench/Arduino/libraries/ArdOSC/OSCCommon/OSCServer.h:31:5: error: 'OSCDecoder::OSCDecoder' names the constructor, not the type
OSCDecoder::OSCDecoder _decoder;
^
/Users/Lotus/Desktop/All Others/Workbench/Arduino/libraries/ArdOSC/OSCCommon/OSCServer.h:32:5: error: 'Pattern::Pattern' names the constructor, not the type
Pattern::Pattern _adrMatch;
^
Error compiling.

Here is the code:

include <SPI.h>

include <Ethernet.h>

include <ArdOSC.h>

byte myMac[] = { 0x90, 0xA2, 0xDA, 0x0F, 0x2B, 0X1E };
byte myIp[] = { 192, 168, 0, 177 };

int destPort=1234;
byte destIp[] = { 169, 254, 166, 0 };

OSCClient client;

//create new osc message
OSCMessage global_mes;

int v3=10;
float v4=10.0;
char str1[]="simple send 1!";

int v1=0;
float v2=0.0;

void setup(){

Ethernet.begin(myMac ,myIp);

}

void loop(){

global_mes.setAddress(destIp,destPort);

global_mes.beginMessage("/ard/send1");
global_mes.addArgInt32(v1);
global_mes.addArgFloat(v2);
global_mes.addArgString(str1);

client.send(&global_mes);

global_mes.flush(); //object data clear

delay(500);

send2();

delay(500);

v1++;
v2 += 0.1;

}

void send2(){
//loacal_mes,str is release by out of scope
OSCMessage loacal_mes;

loacal_mes.setAddress(destIp,destPort);

loacal_mes.beginMessage("/ard/send2");
loacal_mes.addArgInt32(v3);
loacal_mes.addArgFloat(v4);

char str[]="simple send2 !!";
loacal_mes.addArgString(str);

client.send(&loacal_mes);

v3++;
v4 += 0.1;
}

@jvelazqueztraut
Copy link

I solved this by removing the unnecesarry class specification such as:
OSCMessage::
OSCDecoder::
etc
from all the .h files in the library.

@Chris--A
Copy link

I have fixed these errors in my fork of this repo. When using Arduino IDE 1.6.2 or above, you can now download the library directly using the built in library manager.

@CaseyJScalf
Copy link
Author

Thanks Chris--A, I will give this a shot soon and see if we can make some magic happen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants