tag:blogger.com,1999:blog-55988266121677971072024-03-13T19:31:29.319+01:00GAMELASTER's BlogAbout Programming, Electronics, Games, Anime etc...GAMELASTERhttp://www.blogger.com/profile/15880006986446109426noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5598826612167797107.post-20056419940726836082016-02-25T15:48:00.004+01:002016-02-27T17:13:46.808+01:00#1 Arduino Gamepad - Portable Raspberry Pi Game Console DevSo today arrived a thumbsticks! Because I have already other Arduino Pro Micro, I can start making a Arduino stuffs!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-bkSWBYrqEfM/Vs8PABul0-I/AAAAAAAAAOc/kCjK7D3f3bY/s1600/WP_20160224_22_16_41_Pro.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="https://1.bp.blogspot.com/-bkSWBYrqEfM/Vs8PABul0-I/AAAAAAAAAOc/kCjK7D3f3bY/s400/WP_20160224_22_16_41_Pro.jpg" width="400" /></a></div>
<br />
<span id="goog_1780630994"></span><span id="goog_1780630995"></span>The first thing I think what will arrive first be a thumbsticks, and thinking becomes true!<br />
Well, the Arduino Pro Micro what I bought came maybe as last item, but for now I use my own same Arduino Pro Micro.<br />
<br />
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!<br />
<br />
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! (<a href="http://eleccelerator.com/tutorial-about-usb-hid-report-descriptors/" target="_blank">Source</a>)<br />
<br />
Now just only a implement functions to library!<br />
And its done!<br />
<br />
Source:<br />
<a href="https://github.com/GAMELASTER/ArduinoGamepad">https://github.com/GAMELASTER/ArduinoGamepad</a><br />
<br />
The next thing what is needed is of course a Arduino Code implementation, you can see my example <a href="https://github.com/GAMELASTER/ArduinoGamepad/blob/master/examples/ThumbsticksTest/ThumbsticksTest.ino" target="_blank">HERE</a>. Its contains a calibration (for good center) and formatting valid values for descriptor!<br />
<br />
Instructable article with more informations:<br />
<a href="http://www.instructables.com/id/Arduino-LeonardoMicroATMega32u4-As-GamepadGame-Con/">http://www.instructables.com/id/Arduino-LeonardoMicroATMega32u4-As-GamepadGame-Con/</a><br />
<br />
Video with playing Mirrors Edge: (I used a X360CE to patch XINPUT etc. for make GamePad working in game (Game supports only XBOX360 Gamepad)):<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/iaj-2EXoXwk/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/iaj-2EXoXwk?feature=player_embedded" width="320"></iframe></div>
<br />
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!<br />
<br />
-gamieeGAMELASTERhttp://www.blogger.com/profile/15880006986446109426noreply@blogger.com0tag:blogger.com,1999:blog-5598826612167797107.post-81363447182220908112016-02-03T22:03:00.000+01:002016-02-27T16:38:03.090+01:00 #0 Introduction - Portable Raspberry Pi Game Console DevHey guys,<br />
<br />
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!<br />
<br />
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!<br />
<br />
Before I write a list of items what I bought, first I will write what items is needed and what is it usage.<br />
<br />
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!<br />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).<br />
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.<br />
<br />
I think its all about hardware, but anything can be changed while building.<br />
<br />
There is list of items what I bought, soon I will add a eBay links and costs:<br />
<br />
<ol>
<li>Raspberry Pi 2 (30€)</li>
<li>Analog Display (10€)</li>
<li>DCDC Convertor (1,16$)</li>
<li>2x Thumbsticks (3,98$)</li>
<li>Arduino Pro Micro (4,30$)</li>
<li>20x Buttons with plastic fields (1,99$)</li>
<li>3,5mm Male Jack (1,89$)</li>
<li>Audio Amplifier</li>
</ol>
<div>
And some others things. Some things I got home, but its not a expansive things!</div>
<div>
Fully I paid +- 50€ for all!</div>
<div>
<br /></div>
<div>
Next I need to setup all electronics, make a 3D case model and found someone who will print it!</div>
<div>
<br /></div>
<div>
And now, just waiting to items arrive!</div>
<div>
<br /></div>
<div>
Step by step I will write a articles about things I do, so dont forget to check my blog!</div>
GAMELASTERhttp://www.blogger.com/profile/15880006986446109426noreply@blogger.com0