zapalot / ardoscforwiflyhq Goto Github PK
View Code? Open in Web Editor NEWA modified version of ArdOsc for working with the WiFlyHQ library on Arduino
A modified version of ArdOsc for working with the WiFlyHQ library on Arduino
I am using the library to send/receive OSC commands from an Arduino to an IPhone - and it works great.
I am interested in adding a new WiFly connection to an additional machine for logging some Arduino data. Can you please give me directions( or an example ) on how to achieve this - having 2 simultaneous UDP connections from the Arduino ?
Thanks in advance
Here's my arduino error log when trying to compile your example "SimpleRecieve.cpp"
SimpleReceive:26: error: no matching function for call to 'OSCServer::OSCServer()'
X:\Arduino\libraries\ArdOscForWiFlyHQ/OSCCommon/OSCServer.h:41: note: candidates are: OSCServer::OSCServer(WiFly*)
X:\Arduino\libraries\ArdOscForWiFlyHQ/OSCCommon/OSCServer.h:28: note: OSCServer::OSCServer(const OSCServer&)
SimpleReceive.cpp: In function 'void setup()':
SimpleReceive:37: error: 'class OSCServer' has no member named 'begin'
SimpleReceive:42: error: 'ledPin' was not declared in this scope
SimpleReceive.cpp: In function 'void loop()':
SimpleReceive:50: error: 'class OSCServer' has no member named 'aviableCheck'
SimpleReceive:55: error: 'ledPin' was not declared in this scope
SimpleReceive:58: error: 't' was not declared in this scope
SimpleReceive.cpp: In function 'void func1(OSCMessage*)':
SimpleReceive:65: error: 't' was not declared in this scope
I'll take a look at it later to see if I can't find more details on where the problem is located. Thanks for your work on this!
I am using the library in combinatino with the WiflyHQ library.
Control device: iPhone5 with TouchOSC.
uC: ArduinoMega with Wifly, directly connected to RX,TX,3.3v,GND
Sending messages from iPhone to Arduino just will be interpreted once in a while, it is very unstable. So sending an OSC signal to turn on or off LED needs about 5-10 trials.
My testcode:
//++++++++++++++++++++++++++++++++++++++++WIFLY&OSC++++++++++++++++++++++++++++++++++++
char* ssid = "";
char pass = "";
char IPwifly = "192.168.192.200"; //IP Wifly Module
int Portwifly = 8000; //Touchosc: Outgoing
char* IPhost = "192.168.192.7"; //IP iPhone
int Porthost = 9000; //Touchosc: Incoming
WiFly WIFI;
OSCServer server(&WIFI); // receive
OSCClient client(&WIFI); // send
OSCMessage global_mes;
void setup() {
Serial1.begin(115200);
Serial.begin(115200);
WIFI.setupForUDP(&Serial1,115200,true,ssid,pass,"WiFly",IPwifly,Portwifly,IPhost,Porthost,true);
// WIFI.printStatusInfo();
pinMode(13,OUTPUT);
digitalWrite(13,LOW);
//++++++++++++++++++++++++++++++++++++++++++++++++ReceiveFunctions++++++++++++++++++++++++++++++++++++++++++++++++
server.addCallback("/1/1",&switchPage);
}
void loop() {
if(server.availableCheck(2)>0){
Serial.println("ok");
}
}
void switchPage(OSCMessage *_mes) {
if (_mes->getArgFloat(0)==0) digitalWrite(13,LOW);
else if (_mes->getArgFloat(0)==1) digitalWrite(13,HIGH);
}
Hi
I've tried your exemple to send OSC with the Wifly shield, but it doesn't work.
I've buy this shield: https://www.sparkfun.com/products/9954
I'm working with aduino IDE 1.0.5
I've tried to connect the shield with the "official" Library and the IDE 0023, and it work great.
I think it's because the serial connection is wrong, I've trying with HardwareSerial, and SoftwareSerial with pins (12, 11).
I've see on this document a UART Device between Arduino and the Wifly: https://www.sparkfun.com/datasheets/DevTools/Arduino/WiFly_Shield-v17.pdf
Does-it why it don't work?
I need to by-pass this and connect the Serials pins directly on the Wifly Rx Tx?
Or I need to modify the exemple to communicate via SPI?
Thank in advance.
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.