I wrote a simple code in processing using processing.net library to send a data to my wishield to control it...however what i was trying to do was go to android mode and use it, I found that processing.net doesn't work in android mode so now i need to write a code using OSCP5 and netP5, i'm trying it whole day but not a single success in even turning on a led...my processing.net code is
import processing.net.*;
Client myClient;
//int dataIn;
String data;
void setup() {
size(200, 200);
myClient = new Client(this, "192.168.1.122", 1000);
}
void draw() {
fill(255,0,0);
rect(50,50,100,100);
if (myClient.available() > 0) {
//dataIn = myClient.read();
data = myClient.readString();
println(data);
}
//background(dataIn);
myClient.clear();
}
void mousePressed() {
myClient.write("1\n");
myClient.stop();
myClient = new Client(this, "192.168.1.122", 1000);
}
all i want to do is send "1\n" to my device 192.168.1.122 at port 1000 using netP5 and Osc5, I'm new to these libraries and I've not been able to get any result despite trying to hack into tcp codes...please provide me with small code example to just send "1\n" to the needed ip address at required port...then maybe i can develop an android app