Sunday, 9 March 2014

Importing serial values into Processing.

Now that I have actual output from my Arduino, Its time to start attempting to import these values into processing.
The first step is using processing's built in serial library. I made the mistake of attempting to find this online from various sources, before a forum post revealed it to be intergrated as part of the software. I simply updated my version of processing (for some reason I was using 1.5) to version 2 and imported processing.serial.*; Which tells it to include all files it has for importing serial data.

All that needed to be done in the processing sketch then was telling it to take the values it's reading from the serial port, and print them in the console.

I believe that now that I have these values importing into processing, it wont be long before I can do something with them.

This is the example sketch that reads then writes the serial values into the console.

A closer look at the processing console, showing values increase and decrease based on users hand movement.

Thanks go to https://learn.sparkfun.com/tutorials/connecting-arduino-to-processing/to-processing for the tutorial on importing serial values to processing.

No comments:

Post a Comment