This tutorial was featured on the official Arduino blog on 3/9/2011
The next four episodes are all about communicating between the Arduino and other devices. In this video, we’ll focus on communicating with the computer via a standard serial connection. We’ll be using a new programming language called “processing” to visualize some information from the Arduino on the computer screen. If you are new to processing, they have an excellent set of tutorials to help you get started.
The Arduino Contest has been extended! You only have 1 more week to submit your project!
EDIT:
Serial.flush() has changed in Arduino 1.0. You can use the following instead:
while(Serial.available()>0) Serial.read();
You can download the files associated with this episode here:
Distributed under the GNU General Public (Open-Source) License.
Please Attribute and Share-Alike.













February 18, 2012 at 12:56 am
Great job on the tutorials. The processing help is awesome for beginners. Showing how to collect data (like temp), display in a graph (on processing), and save to a file would be a really cool tutorial if you are looking for ideas! I would love to see something like that.
February 22, 2012 at 8:01 am
hi jerry in the processing window i just get a warning like this
RXTX Version mismatch
Jar version = RXTX-2.2pre1
native lib Version = RXTX-2.2pre2
February 22, 2012 at 2:25 pm
hi jerry i have a doubt if i m gonna use a joystick it has two axis x and y how will i giv the input via serial communication any ideas pls.. :(
February 23, 2012 at 5:13 pm
Jeremy,
I have been stuck on the multiple invalid glitch for a week.
I’ve tried both combinations “(Serial.flush & while(Serial.available()>0) Serial.read();” and copied and pasted the whole code right from your pde file but I still get repeats.
I can’t move forward till I understand and correct this problem.
Could it be that Arduino 1.0 is playing well on my Duemilanove?
Thanks for your help.
Jim G.
March 7, 2012 at 9:43 pm
did you solved this problem? please reply Ive been stuck with this too
April 9, 2012 at 1:57 pm
I am having the same issue with my seeduino. Any help would be great
Devin
April 7, 2012 at 3:48 am
did anyone solved the problem that Jim G. and anorexis had? i have this problem too… and tried both combinations too :-(
April 9, 2012 at 8:37 pm
I’m stuck myself. I’m a total newbie at this and have not been able to resolve the Serial.flush() issue with Arduino 1.0
April 23, 2012 at 1:14 pm
Try the code with an older version of Arduino, and see if that works for you. I was able to use the replacement code without an issue.
Pingback: [troubleshooting] analog input from arduino to processing
May 15, 2012 at 2:18 pm
does it work on mega adk ?
how ?