Read a Joystick in Processing?

I am making a Bluetooth controlled spy robot. I need to be able to read the joystick to control the robot and the little analog stick to control the pan/tilt system. I am not that fluent in processing, so I don't know if there is a joystick command or do I have to use a library.Thx

sort by: active | newest | oldest
lemonie5 years ago
Apart from the joystick; what are you building this with?

D5quar3 (author)  lemonie5 years ago
It is a bluesmirf hooked up to an arduino or a chipKIT running two modified servos the pan and tilt system is two servos.
Analog read function is all you need.

D5quar3 (author)  steveastrouk5 years ago
The joystick is hooked up to processing on my laptop and when it gets data it sends it to my arduino
Ah, now if you'd actually said that in the first place...

Try JavaJoystick.

D5quar3 (author)  steveastrouk5 years ago
Sorry, so I say import JavaJoystick
Not being a Processing expert, I suggest that you look at the documentation for the thing. AIUI, if its in the library path for your project, Processing can use it.

D5quar3 (author)  steveastrouk5 years ago
A thought just came to me. What if I use two arduinos, go directly to the pots and have one telling the serial the data, then have the processing code read it and send it to the other via bluetooth.
That's another method - use a serial interface to Processing.
D5quar3 (author)  steveastrouk5 years ago
ok thanks