1681Views10Replies

Author Options:

Read a Joystick in Processing? Answered

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

10 Replies

user
lemonie (author)2012-01-29

Apart from the joystick; what are you building this with?

L

Select as Best AnswerUndo Best Answer

user
D5quar3 (author)lemonie2012-01-29

It is a bluesmirf hooked up to an arduino or a chipKIT running two modified servos the pan and tilt system is two servos.

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)D5quar32012-01-29

Analog read function is all you need.

Steve

Select as Best AnswerUndo Best Answer

user
D5quar3 (author)steveastrouk2012-02-01

The joystick is hooked up to processing on my laptop and when it gets data it sends it to my arduino

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)D5quar32012-02-01

Ah, now if you'd actually said that in the first place...

Try JavaJoystick.

Steve

Select as Best AnswerUndo Best Answer

user
D5quar3 (author)steveastrouk2012-02-01

Sorry, so I say import JavaJoystick

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)D5quar32012-02-01

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.

Steve

Select as Best AnswerUndo Best Answer

user
D5quar3 (author)steveastrouk2012-02-01

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.

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)D5quar32012-02-01

That's another method - use a serial interface to Processing.

Select as Best AnswerUndo Best Answer