Hey everyone, I hope that someone'll be able to help me with a problem I'm having.
Basically, I'm sending a series of numbers from my phone (accelerometer and button presses) to processing for packaging and interaction with Arduino via serial communications.
The problem is, whenever I start to send the packaged data which looks something like this: <0[0-180],0[0-180],0[0-1]>
Processing just freezes. No warnings, no indications of what caused the failure, it just stops doing anything. The sketch icon that appears when you run the program stays stuck in the task bar even when you close Processing fully, so something very strange is going on.
When I re-open Processing, it stays broken, so the only way I've found to bring it back to life is do a full restart of the system.
If anyone has any clue of what's going on or how to address it, that would be most appreciated.
Here's what code I have, should that help.
import processing.serial.*;
Serial myPort;
import oscP5.*;
import netP5.*;
float y2;
float z2;
String yy;
String zz;
String ii = "00";
String sending;
OscP5 osc;
void setup() {
osc = new OscP5(this, 10000); //this line tells processing to listen for
//info from processing.
osc.plug(this, "tilting", "/tilt"); //This line says that whenever /tilt is
//recieved from the phone, to activate the function "tilting"
//which is listed below under void draw().
osc.plug(this, "touching", "/touch");
println(Serial.list());
myPort = new Serial (this, Serial.list()[0], 9600, 'N', 8, 1.0);
Hey everyone, hope I'm not in the wrong place, but anyway.
I'm having a few issues with sending information down the serial.
What I'm doing is taking some accelerometer and touch data from a phone, bundling it up so that it looks something like this: <0060,0050,00> and then sending it away to Arduino for playing with servos.
But that's not really important.
What I'm finding is that for a while Processing is happily getting and sending away these packets of data down the serial port before just stopping. No error messages, no indication that something's wrong, it just stops everything. This is not what I'm after (as you can safely assume), I just want it to keep receiving and sending this data forever without issue. I don't know if this is because the buffer is full or how I would fix it, but any assistance would be greatly appreciated.
Here's my code, hopefully it shall help out.
import processing.serial.*;
Serial myPort;
import oscP5.*; import netP5.*;
String yy; String zz; String ii = "00"; String sending;
OscP5 osc;
void setup() { osc = new OscP5(this, 10000); osc.plug(this, "tilting", "/tilt"); osc.plug(this, "touching", "/touch"); println(Serial.list()); myPort = new Serial (this, Serial.list()[0], 9600, 'N', 8, 1.0); }