2046Views10Replies

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

Comments

The forums are retiring in 2021 and are now closed for new topics and comments.
0
lemonie
lemonie

9 years ago

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

L

0
D5quar3
D5quar3

Answer 9 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.

0
steveastrouk
steveastrouk

Answer 9 years ago

Analog read function is all you need.

Steve

0
D5quar3
D5quar3

Answer 9 years ago

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

0
steveastrouk
steveastrouk

Answer 9 years ago

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

Try JavaJoystick.

Steve

0
D5quar3
D5quar3

Answer 9 years ago

Sorry, so I say import JavaJoystick

0
steveastrouk
steveastrouk

Answer 9 years ago

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

0
D5quar3
D5quar3

Answer 9 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.

0
steveastrouk
steveastrouk

Answer 9 years ago

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

0
D5quar3
D5quar3

Answer 9 years ago

ok thanks

Dave