Thursday, February 25, 2016

#1 Arduino Gamepad - Portable Raspberry Pi Game Console Dev

So today arrived a thumbsticks! Because I have already other Arduino Pro Micro, I can start making a Arduino stuffs!


The first thing I think what will arrive first be a thumbsticks, and thinking becomes true!
Well, the Arduino Pro Micro what I bought came maybe as last item, but for now I use my own same Arduino Pro Micro.

As first thing what I need to do is make a computer to see Arduino as Gamepad! Not all Arduinos/Atmel chips support this, but Pro Micro/Leonardo with ATMega32u4 support custom HID Descriptor. Nice!

So, Im going to make a custom Gamepad library for Arduino! Now I need to search a Gamepad HID descriptor, I dont found alot of sources, but its enough! (Source)

Now just only a implement functions to library!
And its done!

Source:
https://github.com/GAMELASTER/ArduinoGamepad

The next thing what is needed is of course a Arduino Code implementation, you can see my example HERE. Its contains a calibration (for good center) and formatting valid values for descriptor!

Instructable article with more informations:
http://www.instructables.com/id/Arduino-LeonardoMicroATMega32u4-As-GamepadGame-Con/

Video with playing Mirrors Edge: (I used a X360CE to patch XINPUT etc. for make GamePad working in game (Game supports only XBOX360 Gamepad)):

So that is all for today, i hope you enjoy this little article! Next article will be maybe about solving a problem of lack digital inputs, its not enough or about thing what will arrive home next!

-gamiee

Wednesday, February 3, 2016

#0 Introduction - Portable Raspberry Pi Game Console Dev

Hey guys,

I really like a old games like Final Fantasy, Sword of Mana, GTA:LCS and many others! So i wanted to buy a some console, but its cost a some money and i cannot play a games from other consoles, so I get idea to create a myself handheld game console!

For first I needed to select a device, so I chose a Raspberry Pi 2, because I want to play some PSP games. Then next I need a display etc... Because I dont have a so much money, I tried to find a cheapest items, so eBay!

Before I write a list of items what I bought, first I will write what items is needed and what is it usage.

So, I selected Raspberry Pi 2! Next we need a some display to draw our games! I searched in eBay a 4,5 inch parking camera into cars, its cheap!
But we need "feed" display with "energy". Display need a 12V, but from batteries we can get only 3,7V or 7,4V etc. So we need a DCDC 12V convertor, when minimal voltage is lower than 3,7V and effectivity is more than 90%. Next we need a batteries, for now I dont know what batteries I use, and I got some batteries at home, so Im taking this to later. Well, of course we need a sound! So some speakers. I use a speakers from my old laptop, so it isnt in my list of bought things, but we need a Stereo Amplifier. And now the gameplay things. I want to use all components whats used in PS2 controller, so two thumbsticks and 14 buttons (i bought a pack of 20 big buttons with plastic headers).
For connection of thumbsticks, buttons and other hardware things we need an Arduino (or Atmel chip). First I wanted to use ATTiny, but because its expansive (and maybe USB HID is not supported, but I think its supported) i selected a Arduino Pro Micro, what is cheap, small, but we dont have enough pins. For this we need IN 8-BIT Shift Register, probably CD4021, I will buy it in a "stone store", its cheap. So we got +6 PINs. For connecting a Display and Speakers, we need to buy an 3,5mm 4 pole Male jack, + 2 "pins" from RCA cable (connection of display) and some wires into a sound amplifier.

I think its all about hardware, but anything can be changed while building.

There is list of items what I bought, soon I will add a eBay links and costs:

  1. Raspberry Pi 2 (30€)
  2. Analog Display (10€)
  3. DCDC Convertor (1,16$)
  4. 2x Thumbsticks (3,98$)
  5. Arduino Pro Micro (4,30$)
  6. 20x Buttons with plastic fields (1,99$)
  7. 3,5mm Male Jack (1,89$)
  8. Audio Amplifier
And some others things. Some things I got home, but its not a expansive things!
Fully I paid +- 50€ for all!

Next I need to setup all electronics, make a 3D case model and found someone who will print it!

And now, just waiting to items arrive!

Step by step I will write a articles about things I do, so dont forget to check my blog!