Loading

5 inch Raspberry Pi Gear: Retro Handheld game system

by miniarcademachines, published

5 inch Raspberry Pi Gear: Retro Handheld game system by miniarcademachines Jul 25, 2017

Summary

UPDATE: i have a kickstarter going on this project so i can offer higher qaulity prints to people who would like to purchase the case/pcb/buttons over making their own. See this link https://www.kickstarter.com/projects/1088100966/pigear-handheld-gaming-system-20
This version is an expansion on the 2.8 inch version. The internal components besides the screen are the same. The added features on this one are that you have an external usb to connect a keyboard, or joystick to, and there is enough space to use 2 cylinder batteries to maximize play time. This design was inspired by the Sega Game Gear, and closely matches its size in both overall dimensions, and screen size. The idea was to make a better version of the pigrrl 2 that was so uncomfortable to hold. The improvements are that it has increased battery capacity, available hdmi, and eliminated the awful speaker hum that the pigrrl 2 had. This design incorporates a teensy for the controls so you have true analog for the joystick instead of just a dpad function like other projects. basically i took all the features i liked from other projects, took out the ones i didnt, and added what i thought should be there. I look forward to more designs in the future, and i hope that this one being released freely increases the interest in it.

Im not sure how well the 3d printed 6 button plate will work and i dont have one for the dpad or start/select buttons. This design was intended to use a set of pcb's i designed, and can be purchased rather cheap ($10) for all 3 boards. http://miniarcademachines.com/product/pcb-boards-for-the-5-inch-pigear/

The other items you will need are as follows:
1x - Raspberry Pi 3 - Model B
1x - Adafruit Mono 2.5W Class D Audio Amplifier - PAM8302
1x - Breadboard-friendly SPDT Slide Switch (check measurements before ordering, i use non standard switches)
1x - Lithium Ion Polymer Battery - 3.7v 2500mAh (cylinder type, look like AA)
2x - Mini Metal Speaker w/ Wires - 8 ohm 0.5W
1x - PowerBoost 1000 Charger (500 will work with using a smaller screw)
1x - 16GB sandisk or samsung class 10 SD/MicroSD Memory Card with retropie/attract front end (link can be provided for a download because its real tricky getting the lcd to work)
1x - 5 in TFT lcd for raspberry pi (waveshare brand with holes is what i use, but you may find other cheap ebay ones that might work)
6x - 6mm Tactile Button switches
6x - 12mm Tactile Button switches (the kind with a keycap that is removable)
10x - #4-40 3/8 machine screws
4x - #2-56 3/8 machine sccrews
1x - ribbon cable to cut up for jumper wire connections, and possibly 22 gauge for connecting the analog stick

Print Settings

Printer Brand:

FlashForge

Printer:

Creator Pro

Rafts:

No

Supports:

No

Resolution:

.2

Infill:

20%


Notes:

speed for first layer was 40mm/sec and the rest was 60-80mm/sec. My printer runs real hot so i cant recommend a temp. the zip file attached is the teensy code for the controller setup. You will need it!

Post-Printing

How I Designed This

This design started in adobe illustrator, then was imported as a dxf in solidworks and saved as an stl. I used the makerbot software for printing prep.

More from 3D Printing

view more

All Apps

Upgrade this Thing with Thingiverse Apps

Tools and Utilities

Repair, slice, or enhance this Thing


Auto-magically prepare your 3D models for 3D printing. A cloud based 3D models Preparing and Healing solution for 3D Printing, MakePrintable provides features for model repairing, wall thickness...

App Info Launch App

Kiri:Moto is an integrated cloud-based slicer and tool-path generator for 3D Printing, CAM / CNC and Laser cutting. *** 3D printing mode provides model slicing and GCode output using built-in...

App Info Launch App
KiriMoto Thing App

Quickly Scale, Mirror or Cut your 3D Models

App Info Launch App

i believe this is it


/* Complete USB Joystick Example
Teensy becomes a USB joystick with 16 or 32 buttons and 6 axis input

You must select Joystick from the "Tools > USB Type" menu

Pushbuttons should be connected between the digital pins and ground.
Potentiometers should be connected to analog inputs 0 to 5.

This example code is in the public domain.
*/

// Configure the number of buttons. Be careful not
// to use a pin for both a digital button and analog
// axis. The pullup resistor will interfere with
// the analog voltage.
const int numButtons = 16; // 16 for Teensy, 32 for Teensy++

void setup() {
// you can print to the serial monitor while the joystick is active!
Serial.begin(9600);
// configure the joystick to manual send mode. This gives precise
// control over when the computer receives updates, but it does
// require you to manually call Joystick.send_now().
Joystick.useManualSend(true);
for (int i=0; i<numButtons; i++) {
pinMode(i, INPUT_PULLUP);
}
Serial.println("Begin Complete Joystick Test");
}

byte allButtons[numButtons];
byte prevButtons[numButtons];
int angle=0;

void loop() {
// read 6 analog inputs and use them for the joystick axis
Joystick.X(analogRead(0));
Joystick.Y(analogRead(1));
// Joystick.Z(analogRead(2));
//Joystick.Zrotate(analogRead(3));
//Joystick.sliderLeft(analogRead(4));
//Joystick.sliderRight(analogRead(5));

// read digital pins and use them for the buttons
for (int i=0; i<numButtons; i++) {
if (digitalRead(i)) {
// when a pin reads high, the button is not pressed
// the pullup resistor creates the "on" signal
allButtons[i] = 0;
} else {
// when a pin reads low, the button is connecting to ground.
allButtons[i] = 1;
}
Joystick.button(i + 1, allButtons[i]);
}

// make the hat switch automatically move in a circle
//angle = angle + 1;
// if (angle >= 360) angle = 0;
// Joystick.hat(angle);

// Because setup configured the Joystick manual send,
// the computer does not see any of the changes yet.
// This send_now() transmits everything all at once.
Joystick.send_now();

// check to see if any button changed since last time
boolean anyChange = false;
for (int i=0; i<numButtons; i++) {
if (allButtons[i] != prevButtons[i]) anyChange = true;
prevButtons[i] = allButtons[i];
}

// if any button changed, print them to the serial monitor
if (anyChange) {
Serial.print("Buttons: ");
for (int i=0; i<numButtons; i++) {
Serial.print(allButtons[i], DEC);
}
Serial.println();
}

// a brief delay, so this runs "only" 200 times per second
delay(5);
}


This is absolutely beautiful, How is the Teensy plugged into the RPi? Is it just USB to USB?

yes, micro usb to teensy, regular end goes to the pi.

I don't suppose you have a how-to posted anywhere on how to set the Teensy up, do you?

I have the code that I can copy and paste, Beyond that there are plenty of tutorials how to do the actual programming of the device.

That'll work for me! thanks! =)

Comments deleted.
Top