Hi all,
Does anyone has information to receive data commnunication from processing to "arduino duemilanove" by sending "0" or "1" byte through serial ? I've received nothing when communicate from serial to arduino and need someone to further guide me. Those reference I took from websites "Connecting Arduino to Processing - SparkFun Learn"
My coding in processing:
import processing.serial.*;
Serial myport;
void setup(){
String portname = Serial.list()[0];
myport = new Serial(this,portname,9600);
}
void draw(){
if (myport.available() > 0 )
{
myport.write("1");
println("Print 1 to arduino Now");
}
}
My coding in arduino : (I'd tried to monitor incoming byte from process in serial monitor)
int incomingByte = 0 ;
void setup()
{
Serial.begin(9600);
}
void loop()
{
if (Serial.available() > 0 )
{
incomingByte = Serial.read();
Serial.print("check :");
Serial.println(incomingByte,DEC);
}
}
The situation is weird where It show nothing happened and returned empty in output once I opened serial monitor to check out. I've managed to pluged in to power arduino(First) and click to run processing(second).
How i could possible to receive "1" from processing to arduino through serial monitor?
Hopw someone could guide me in further, Thanks.