I connected my joystick with this tutorial: link

However, it does not work. The code runs fine (after changing print "---" to print("---") to support modern python), but the output values stay at 0.

X : 0  Y : 0  Switch : 0

This is my circuit. I checked it 2-3 times, seems fine.


  • "+" and "-" are reversed on my breadboard. I decided to stay consistent with marks on my breadboard, not the tutorial.
  • pins on my joystick are different. (on my js, highest says "GND", second highest says "5W". bottom three output signals.

enter image description here enter image description here

  • \$\begingroup\$ Your diagram shows wires from the joystick going to MCP3008 pins 1, 2, and 3. But in your photo it looks like they are connected to pins 2, 3, and 4. Also double-check the wires providing power to the joystick because they don't match the diagram either. \$\endgroup\$ – kkrambo Dec 22 '20 at 15:51
  • \$\begingroup\$ Yep, but i just fixed it. Still does not work. \$\endgroup\$ – MBee Dec 22 '20 at 15:59
  • \$\begingroup\$ @kkrambo yes, I actually messed up the description of my js. I connected it properly, 2nd highest pin provides power. \$\endgroup\$ – MBee Dec 22 '20 at 16:23
  • \$\begingroup\$ Code? Are you setting up the pins correctly? \$\endgroup\$ – Ron Beyer Dec 22 '20 at 18:11
  • \$\begingroup\$ @RonBeyer code can be found in the link. I did not modify the layout. \$\endgroup\$ – MBee Dec 22 '20 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.