# PyGamer - Gaming Handheld Crank

## Overview

Gaming Cranks are the hot rage in handheld input devices right now. Its a great input for games and applications!&nbsp;

The Adafruit PyGamer is a perfect gaming device to attach a crank as an input device for games and more!

We have a great example in the Cranky Gif player!

![3d_printing_crank-hero-loopB.gif](https://cdn-learn.adafruit.com/assets/assets/000/076/687/medium640thumb/3d_printing_crank-hero-loopB.jpg?1560186449)

![](https://cdn-learn.adafruit.com/assets/assets/000/076/738/medium800thumb/3d_printing_crank-hero-loop.jpg?1560198148)

In the Cranky Gif player demo, rotating the crank makes a gif image step through each frame of its animation. It brings back the experience of those old school&nbsp;[Mutoscope](https://en.wikipedia.org/wiki/Mutoscope) viewers!&nbsp;

For this project, we designed and 3d printed an articulating hinge crank add-on for rotary encoders.

We designed a case to house the PyGamer with geometry to hold the&nbsp;rotary encoder in place.

You can also add custom NinjaFlex buttons and d-pads to make the buttons feel more grippy and squishy!&nbsp;

We'll then cover how to modify headers to make connecting to the PyGamer easier!&nbsp;

![3d_printing_3d-parts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/076/694/medium640/3d_printing_3d-parts.jpg?1560189085)

![3d_printing_crank-gameplay.gif](https://cdn-learn.adafruit.com/assets/assets/000/076/696/medium640thumb/3d_printing_crank-gameplay.jpg?1560189156)

## You can also use existing Knob parts like our [Circuit Python Media Dial!](https://learn.adafruit.com/media-dial)
![](https://cdn-learn.adafruit.com/assets/assets/000/076/740/medium800thumb/3d_printing_dail-loop.jpg?1560198277)

## Parts List
An easy to copy and paste list of parts used in this project.

- [Adafruit PyGamer](adafru.it/4242)
- [USB Cable with data lines](https://www.adafruit.com/product/4148)
- [400mAh 3.7v lipo battery](https://www.adafruit.com/product/3898)
- [Mini oval speaker](https://www.adafruit.com/product/4227)
- [Inventor II 3D Printer](https://www.adafruit.com/product/3897)
- [Filament for 3D Printers](https://www.adafruit.com/product/2080)

![3d_printing_parts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/076/692/medium640/3d_printing_parts.jpg?1560188573)

### Rotary Encoder + Extras

[Rotary Encoder + Extras](https://www.adafruit.com/product/377)
This rotary encoder is the best of the best, it's a high-quality 24-pulse encoder, with detents and a nice feel. It is panel mountable for placement in a box, or you can plug it into a breadboard (just cut/bend the two mechanical side tabs.) We also include a nice soft-touch knob with an...

In Stock
[Buy Now](https://www.adafruit.com/product/377)
[Related Guides to the Product](https://learn.adafruit.com/products/377/guides)
![Rotary Encoder with rubbery knob](https://cdn-shop.adafruit.com/640x480/377-02.jpg)

### Adafruit PyGamer for MakeCode Arcade, CircuitPython or Arduino

[Adafruit PyGamer for MakeCode Arcade, CircuitPython or Arduino](https://www.adafruit.com/product/4242)
What&nbsp;fits in your pocket, is fully Open Source, and can run CircuitPython, MakeCode Arcade or Arduino games you write yourself? That's right, it's the **Adafruit PyGamer!** We wanted to make an entry-level gaming handheld for DIY gaming, and maybe a little...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4242)
[Related Guides to the Product](https://learn.adafruit.com/products/4242/guides)
![Angled shot of Adafruit PyGamer for MakeCode Arcade, CircuitPython or Arduino.](https://cdn-shop.adafruit.com/640x480/4242-00.jpg)

### Mini Oval Speaker with Short Wires - 8 Ohm 1 Watt

[Mini Oval Speaker with Short Wires - 8 Ohm 1 Watt](https://www.adafruit.com/product/4227)
Hear the good news! This wee speaker&nbsp;is&nbsp;a&nbsp;great addition to any audio project where you need 8 ohm impedance and 1W or less of power. We particularly like this&nbsp;speaker&nbsp;as it is&nbsp;small and comes with nice skinny wires with a connector on the end. It has a handy...

In Stock
[Buy Now](https://www.adafruit.com/product/4227)
[Related Guides to the Product](https://learn.adafruit.com/products/4227/guides)
![Mini Oval Speaker with Short Wires ](https://cdn-shop.adafruit.com/640x480/4227-06.jpg)

### Lithium Ion Polymer Battery with Short Cable - 3.7V 350mAh

[Lithium Ion Polymer Battery with Short Cable - 3.7V 350mAh](https://www.adafruit.com/product/4237)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of 350mAh for a total of about 1.3 Wh. If you need a larger (or smaller!) battery, <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/4237)
[Related Guides to the Product](https://learn.adafruit.com/products/4237/guides)
![Lithium Ion Polymer Battery 3.7v 350mAh with JST 2-PH connector and short cable](https://cdn-shop.adafruit.com/640x480/4237-04.jpg)

### Break-away 0.1" 36-pin strip right-angle male header (10 pack)

[Break-away 0.1" 36-pin strip right-angle male header (10 pack)](https://www.adafruit.com/product/1540)
Breakaway header is like the duct tape of electronics. Its great for connecting things together, soldering to perf-boards, fits into any breadboard, etc. We go through these guys real fast, and thought that given how handy they are, we'd offer them in a pack of ten!  
  
Each pack...

In Stock
[Buy Now](https://www.adafruit.com/product/1540)
[Related Guides to the Product](https://learn.adafruit.com/products/1540/guides)
![Break-away 0.1 inch 36-pin strip right-angle male header](https://cdn-shop.adafruit.com/640x480/1540-00.jpg)

- [Next Page](https://learn.adafruit.com/gaming-handheld-crank/circuit-diagram.md)

## Featured Products

### Adafruit PyGamer for MakeCode Arcade, CircuitPython or Arduino

[Adafruit PyGamer for MakeCode Arcade, CircuitPython or Arduino](https://www.adafruit.com/product/4242)
What&nbsp;fits in your pocket, is fully Open Source, and can run CircuitPython, MakeCode Arcade or Arduino games you write yourself? That's right, it's the **Adafruit PyGamer!** We wanted to make an entry-level gaming handheld for DIY gaming, and maybe a little...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4242)
[Related Guides to the Product](https://learn.adafruit.com/products/4242/guides)
### Rotary Encoder + Extras

[Rotary Encoder + Extras](https://www.adafruit.com/product/377)
This rotary encoder is the best of the best, it's a high-quality 24-pulse encoder, with detents and a nice feel. It is panel mountable for placement in a box, or you can plug it into a breadboard (just cut/bend the two mechanical side tabs.) We also include a nice soft-touch knob with an...

In Stock
[Buy Now](https://www.adafruit.com/product/377)
[Related Guides to the Product](https://learn.adafruit.com/products/377/guides)
### Mini Oval Speaker with Short Wires - 8 Ohm 1 Watt

[Mini Oval Speaker with Short Wires - 8 Ohm 1 Watt](https://www.adafruit.com/product/4227)
Hear the good news! This wee speaker&nbsp;is&nbsp;a&nbsp;great addition to any audio project where you need 8 ohm impedance and 1W or less of power. We particularly like this&nbsp;speaker&nbsp;as it is&nbsp;small and comes with nice skinny wires with a connector on the end. It has a handy...

In Stock
[Buy Now](https://www.adafruit.com/product/4227)
[Related Guides to the Product](https://learn.adafruit.com/products/4227/guides)
### Lithium Ion Polymer Battery with Short Cable - 3.7V 350mAh

[Lithium Ion Polymer Battery with Short Cable - 3.7V 350mAh](https://www.adafruit.com/product/4237)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of 350mAh for a total of about 1.3 Wh. If you need a larger (or smaller!) battery, <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/4237)
[Related Guides to the Product](https://learn.adafruit.com/products/4237/guides)
### Lithium Ion Polymer Battery Ideal For Feathers - 3.7V 400mAh

[Lithium Ion Polymer Battery Ideal For Feathers - 3.7V 400mAh](https://www.adafruit.com/product/3898)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of **400mAh** for a total of about 1.9 Wh. If you need a larger (or smaller!)...

In Stock
[Buy Now](https://www.adafruit.com/product/3898)
[Related Guides to the Product](https://learn.adafruit.com/products/3898/guides)
### Break-away 0.1" 36-pin strip right-angle male header (10 pack)

[Break-away 0.1" 36-pin strip right-angle male header (10 pack)](https://www.adafruit.com/product/1540)
Breakaway header is like the duct tape of electronics. Its great for connecting things together, soldering to perf-boards, fits into any breadboard, etc. We go through these guys real fast, and thought that given how handy they are, we'd offer them in a pack of ten!  
  
Each pack...

In Stock
[Buy Now](https://www.adafruit.com/product/1540)
[Related Guides to the Product](https://learn.adafruit.com/products/1540/guides)
### Filament for 3D Printers in Various Colors and Types

[Filament for 3D Printers in Various Colors and Types](https://www.adafruit.com/product/2080)
Having a 3D printer without filament is sort of like having a regular printer without paper or ink. &nbsp;And while a lot of printers come with some filament there's a good chance you've been printing up a storm and need something new. &nbsp;That's why we've started carrying a...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2080)
[Related Guides to the Product](https://learn.adafruit.com/products/2080/guides)
### Monoprice Inventor II 3D Printer with Touchscreen and WiFi

[Monoprice Inventor II 3D Printer with Touchscreen and WiFi](https://www.adafruit.com/product/3897)
The **Monoprice Inventor II 3D Printer Touchscreen with WiFi** is a perfect entry-level 3D printer with small footprint and reliable performance. It comes equipped with WiFi so you don't need a cable tether and a lovely 3.5" color touchscreen for settings & feedback....

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/3897)
[Related Guides to the Product](https://learn.adafruit.com/products/3897/guides)

## Related Guides

- [Introducing Adafruit PyGamer](https://learn.adafruit.com/adafruit-pygamer.md)
- [PyGamer Marble Labyrinth in MakeCode Arcade](https://learn.adafruit.com/pygamer-marble-labyrinth-in-makecode-arcade.md)
- [PixelDust Digital Sand Demos for Arcada](https://learn.adafruit.com/pixeldust-digital-sand-demos-for-arcada.md)
- [Bounce - an accelerometer game in Arduino for PyGamer and PyBadge](https://learn.adafruit.com/bounce-an-accelerometer-game-in-arduino-for-pygamer-and-pybadge.md)
- [Making a Name Tag in MakeCode Arcade](https://learn.adafruit.com/making-a-name-tag-in-makecode-arcade.md)
- [How to Hack NES ROMs to Add Your Own Sprites](https://learn.adafruit.com/how-to-hack-roms-to-add-your-own-sprites.md)
- [Arcada Animated GIF Display](https://learn.adafruit.com/pyportal-animated-gif-display.md)
- [AdaBox 012](https://learn.adafruit.com/adabox012.md)
- [PyGamer MP3 Player with CircuitPython](https://learn.adafruit.com/pygamer-mp3-player-with-circuitpython.md)
- [MakeCode Arcade: Sparky Invaders](https://learn.adafruit.com/makecode-arcade-sparky-invaders.md)
- [PyGamer Thermal Camera with AMG8833](https://learn.adafruit.com/pygamer-thermal-camera-amg8833.md)
- [PyBadger Event Badge](https://learn.adafruit.com/pybadger-event-badge.md)
- [Re-MakeCode the Classics: Arkanoid](https://learn.adafruit.com/re-makecode-the-classics-arkanoid.md)
- [Making oscilloscope images with DACs](https://learn.adafruit.com/dac-oscilloscope-images.md)
- [PyGamer NeoPixel Controller](https://learn.adafruit.com/pygamer-neopixel-controller.md)
- [Trash Panda 2: Garbage Day](https://learn.adafruit.com/trash-panda-2-dumpster-dive.md)
