Go Down

Topic: voltage output of joystick (Read 801 times) previous topic - next topic

greatgoogamooga

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

zoomkat

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.
Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   8)

MarkT

You first need to measure the output voltage from both pots on the joystick to check they are 2.5V when at neutral position.
[ I won't respond to messages, use the forum please ]

Go Up