I used the excellent Gaming Handheld Crank guide by the Ruiz Bros. as a launching off point for building this project. Check it out for lots of details.

For the fishing controller, I connected the PyGamer to the rotary encoder like this:

  • Pin A2 connects to the B pin (Green wire)
  • Pin A3 connects to the A pin (Blue wire)
  • GND connects to the common C pin (Gray wire)
  • Pin D9 connects to the Switch pin (Yellow wire)

Since the rotary encoder's switch pin side also uses the common ground, I simply connected it to the C pin over on the encoder side of the part. This prevents you from connecting another wire all the way from the encoder to the board.

I soldered silicone stranded hookup wire to the encoder pins on one end and to 90° angle header pins on the other so I could insert them in the PyGamer's Feather headers without protruding too far from the board.

The additional unused header pins are there simply for mechanical stability of the connections.

With the battery and speaker also plugged in, we're ready to start programming in MakeCode Arcade!

This guide was first published on Aug 12, 2019. It was last updated on Mar 08, 2024.

This page (Adding a Rotary Encoder to PyGamer/PyBadge) was last updated on Mar 08, 2024.

Text editor powered by tinymce.