Pages: [1]   Go Down
Author Topic: voltage output of joystick  (Read 746 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am building a google bike, which dispalys an image of a bicycle in google maps on your web browser, and takes you on a virtual bike ride using input from an arduino.  I'm  following the instructions found here:

http://www.instructables.com/id/Google-Bike/?ALLSTEPS

The arduino (seeeduino) receives input from the rotation of a bicycle wheel using a reed switch (window alarm) and steers a virtual bike using a joysitck.

The problem I'm having is that the image on the screen moves wildly and does not seem to be responding to the input.  The sketch indicates that it print out the joystick directions horiz and vert, click button and wheel rotation to the serial as (h,v,c,r).  This is then echoed on the screen in a python server.

My Question (finally):  The printout on the screen is (756,765, 0,0) with the last digit climbing as it receives input.  The joystick is in a neutral position, here, and the first two numbers will recede to 0 or climb to 1023.  In the neutral position, shouldn't these first two numbers be 512?  If so, what would cause them to read high?

TIA

Goog
Logged

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9470
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Assuming the joystick uses the usual pots, it could be bad pots or miss wiring to allow the pot output voltage to float (improper grounding and such). The other possible issue might be bad code somewhere in your setup.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

0
Offline Offline
Shannon Member
****
Karma: 199
Posts: 11650
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You first need to measure the output voltage from both pots on the joystick to check they are 2.5V when at neutral position.
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: