Hi guys,
Im new to Arduino+Processing and I have a project for school.
can anyone help me with coding this task-
Im using an infrared sensor with this code on arduino (attached) and I would like to ‘forward’ a playing video (for 2 seconds and back to ‘play’) of mine whenever there’s an obstacle infront of the sensor.
could you help me with the codding of processing? thank you from the bottom of my heart!
-1- that not send 1000 lines per sec as your PC/OS/processing
might get stuck, but sure you might not be able to follow any printed data.
-2- now while test you might use
delay(100); // 10 lines per sec
there could be a complete different approach,
just send one line on CHANGE ( and not need any delay )
that would require to have a memory variable "
int obstacle,obstacleold;
// for check use
if ( obstacleold != obstacle ) Serial.println(obstacle);
obstacleold = obstacle;
-3- there is no use in computer communication to send words, you not
talk to human or a WORD program.
send a “0” or “1”,
did you try