Hello all,
I'm trying to transfer data generated on an Arduino Uno R3 to a file on my Mac Mini. I'm using Processing on the Mac and the Mac is connected to the Arduino via the USB cable. I'm also using two slightly modified sketches I lifted from the Arduino and Processing stock examples. Basically, Arduino is reading a value on Analog Input 0 from a potentiometer and sending that out to the Serial port. I've set the pot at an arbitrary position.
The attached file shows a screenshot from my Mac with five windows:
1. The Arduino sketch
2. The Processing sketch
3. The Arduino Serial Monitor window showing the data being sent from the Arduino to the Mac. In this case it is a constant value from the potentiometer setting.
4. A hexdump of the file where the data is written to by the Processing sketch, and
5. The bottom of the Processing window showing the data that is read over the Serial bus by the port.read statement in the Processing sketch
This screenshot can also be viewed at: http://www.flickr.com/photos/kjhart0133/8350131108/sizes/o/in/photostream/ with a little better resolution
Somewhere in the data transfer something odd is happening to the numbers. What is being sent by Arduino is not what is being read by Processing (note the position of the println() statement in the Processing sketch.) I've spent a lot of time trying to figure out what's going on here, but alas I'm stymied. Can anyone see what I'm missing?
Any help is appreciated.
Thanks,
Kevin H.
