I've found this really cool
site on interfacing an Arduino to an optical mouse to read out x-y readings from it. I've done it, and it's working nicely.
Then I was thinking, 'Why not plot all this to become a graph?' and I came across Processing.
I am aware that Processing has an example named '
MouseSignal'
This example is the EXACT thing that I want to write with Processing. But, the only change is that, I want to use the x-y coordinates from the mouse that is attached to the Arduino and ask Processing to generate a 'real-time' graph of the coordinate.
I tried using
this and
this as a start, but I came across a problem. Regarding the Serial.list. All my USB ports on my laptop is detected as COM3 by both Arduino and Processing. So there's a clash. There is no clear way for me to import the data from the serial output. It's either I run Arduino and get only numbers printed out on it's serial monitor, or a blank black window from Processing.
Any help would be appreciated. Thanks!
PS. It's an Arduino Duemilanove if that's any help.