JeremyBlum.com

v3.0

Tutorial 6 for Arduino: Serial Comm and Processing

| 97 Comments

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:

GNU GPL License Distributed under the GNU General Public (Open-Source) License.
Please Attribute and Share-Alike.

 

97 Comments

  1. 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.

  2. 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

  3. 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.. :(

  4. 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.

  5. did anyone solved the problem that Jim G. and anorexis had? i have this problem too… and tried both combinations too :-(

  6. Pingback: [troubleshooting] analog input from arduino to processing

  7. does it work on mega adk ?
    how ?

Leave a Reply

Required fields are marked *.

*