Hi there,
I am making a project, where I am trying to use processing and my Arduino together. I am fairly new in both of the programs.
I haven't had problems with the Arduino program saying that my serial port was busy, until I started using Processing.
But when I started using Processing, at first the problem appeared in that program, and when trying to fix it, it started appearing in Arduino as well. So now I am stuck.
This is what I have tried so far:
I tryed re-installing Processing without luck.
I don't have the two programs open at the same time, so that is not the problem either.
I read a tutorial advising you to go into Terminal and type :
sudo mkdir /var/lock
sudo chmod a+rw /var/lock
- But that didn't change anything either.
This is what my code looks like:
import processing.serial.*;
Serial port;
float brightness = 0;
void setup()
{
size(500,500);
port = new Serial(this, "/dev/tty.AnesIphone-Wirele", 38400);
port.bufferUntil('\n');
}
void draw()
{
background(0,0,brightness);
}
void serialEvent (Serial port)
{
brightness = float(port.readStringUntil('\n'));
}
Thank you in advance !