recotana / ardosc Goto Github PK
View Code? Open in Web Editor NEWOpen Sound Control(OSC) Library for Arduino (tested Arduino 1.0-rc1 & Arduino Ethernet)
Open Sound Control(OSC) Library for Arduino (tested Arduino 1.0-rc1 & Arduino Ethernet)
Hello,
I just bought the Lemur app for iOS, it seems that it sends bundles and apparently ArdOSC doesn't support bundles as I don't seem able to get any messages from the Lemur, is that possible ?
I tried to use ArdOSC with a Arduino Zero and the new Ethernet-shield (with W5500 and Ethernet2 library). While compiling it wanted a W5100 and stopped.
C:\Users\x\Documents\Arduino\libraries\ArdOSC\src\OSCClient.cpp:22:27: fatal error: utility/w5100.h: No such file or directory
#include <utility/w5100.h>
I changed that include to <utility/W5500> (which was present) but then it complained about
C:\Users\x\Documents\Arduino\libraries\ArdOSC\src\OSCClient.cpp: In member function 'int16_t OSCClient::sockOpen()':
C:\Users\x\Documents\Arduino\libraries\ArdOSC\src\OSCClient.cpp:39:21: error: 'W5100' was not declared in this scope
uint8_t s = W5100.readSnSR(i);
How can I use ArdOSC with newer hardware?
Thank you for your effort.
Paul
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:
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;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.