Thursday, April 21, 2016

GameBoul: Putting it together

I started connecting the components for my Project this week. And the connections work!

I first soldered the header box and buttons to my PCB. Then I connected the speaker to the amp by tinning the wires and connecting it to the positive and negative pins on the amp. Afterwards I wired the amp to the PowerBoost. This is how the amp is supplied power. I also connected the switch. Since I was DYING to see if I was doing this right, I took a break from soldering to put in the battery. I flipped the switch and the light came on! After this boost of confidence, I continued soldering. I soldered wires to the two audio pins on the Pi, and then connected them to the amp. This is how the speaker will play the sound. Lastly, I connected the shoulder buttons to the gamepad, and the gamepad to the PowerBoost.






 

I then connected the gamepad to the PiTFT using a ribbon cable. I flipped the switch and my Raspberry Pi turned on! My soldering was a success!!!!!

Below is a video of me putting my pi and some of the extra components into its case.


Thursday, April 14, 2016

Abstract

Lately, my busy schedule has not permitted me to be able to play video games in the comfort of my own room as often as I would like. However, I find myself with some free time during the day when I’m not in my room. While I do have a portable game system, and a cell phone that plays games, I thought it would be cool to play older games that would require me to be in my room to play. This inspired me to transform my Raspberry Pi 2 into a portable video game system. This will allow me to play video games such as Super Mario Bros. on the NES, or even Crash Bandicoot on the PlayStation on the go. The main software to download for this is EmulationStation, which allows one to play any game that is downloaded, provided that there is an emulator installed for it as well. In addition to this software, buttons were connected to the Pi using its GPIO (General Purpose Input and Output) pins in conjunction with a circuit board. This allows the games to be controlled without the need of an external device such as a keyboard. Lastly, a 3D printed case for my Raspberry Pi was needed. This case houses the Pi, the screen, and power supply. It also has cutouts for the buttons on the PCB to control the games. This case makes it so that the Raspberry Pi and all of its connected components are in a compact and neat arrangement, making the video game system portable. In the future, I want to add more games. Currently I only have Super Mario Bros. 3 and Crash Team Racing. These games show the minimum and maximum capability of the Raspberry Pi. I want to also implement my own GUI. This will allow me to not only access EmulationStation, but also the games that came preinstalled with Raspbian. This project will let manufacturers see the capabilities of small hardware, and may shrink the size of game consoles in the future.

Monday, April 11, 2016

THE SCREEN WORKS!!!

So I figured out what was wrong with my screen and got it to work. Early last week I did a fresh install of Raspbian (I said this in my last post), and the screen worked like it did originally. I then tried to run EmulationStation on it from the terminal (clicking on the executable did not work), but it said that there was an error using shared files. I updated the SDL files I had and it still didn't work. Later on in the week I tried running EmulationStation from the terminal, and it worked! "Great," I thought, "now it should show up on the screen!" PSYCH! It showed up on the monitor I was using through HDMI...

I went back to Google and looked for some help. Conveniently, I was brought back to the guide that messed up my screen in the first place, or so I thought. This time I decided to read a little about what fbcp (what I installed last time) does. I know, a CRAZY idea. So apparently, fbcp copies the main screen (what's seen on the HDMI display) onto the PiTFT screen. The reason why it wasn't working last time was because I set the display to show on the PiTFT. SO since the HDMI display was black, it showed black on the PiTFT as well.

To fix this I changed the file where it tells the Pi which screen to display on. I will put a picture of the code later with a brief description of what didn't work and what did.

Stay tuned...


***UPDATE***




The two photos above show the only two ways I was able to display something on my Pi. In the first photo, the desktop shows on the screen, but there a couple of things wrong with it. First, everything was trying to fit on the small 320X240 display so icons were cluttered. It was very annoying to get to the terminal, let along the applications I wanted to start. In addition to that, the games would still show up on the HDMI display. Lastly, it was upside down... And the second picture...well I'm sure you can tell what's wrong. To switch the two I had the change the line Option "fbdev" "/dev/...." The fb0 option set it to the HDMI display and the  fb1 set it to the PiTFT.

Once I installed fbcp and set the right screen to display, I got the results I wanted. The PiTFT screen wasn't cluttered and was turned upright, and as an added bonus, I could show things on the HDMI display and PiTFT. 


Monday, April 4, 2016

Gameboul Update 4/3/16

I got good news and bad news!

Good news is, I got the emulator working! After installing RetroPie (where I left off in my last post) it wound up not working still. So I decided to start fresh and reinstall Raspbian. After the fresh install I tried RetroPie again, and it still didn't work. After doing a little research online, and playing around with it myself, I figured out why. RetroPie starts when the Pi is booted up, and since my Pi was already booted, it would not load. I did not want this because I want to (hopefully) implement my own gui that will start when the Pi boots up. SOOOOO I reinstalled EmulationStation. As I installed it this time, I found out why it didn't work last time: I didn't finish the steps... LOL! It said on the site that it will not work if I don't have any games. I downloaded Super Mario Bros., and the RetroArch emulator. After doing a few edits to the EmulationStation files, I was able to play it!


Bad news is, my screen doesn't work. Or maybe I should say didn't work. My screen currently displays the desktop, however icons are overlapping. Also, the touch part of it does not work. However, at first it did not work, or at least I thought it didn't. It would show the desktop, but it looked weird (icons overlapping) and the games did not show up on the screen. I messed around with it, and got to a point where it was glitching out. The screen would be black but if I moved the mouse, you could see the desktop behind it. After trying to fix my mistakes, I decided to do a fresh install of Raspbian... AGAIN! So now I am currently reinstalling EmulationStation so I can show it playing in class on my screen. Hopefully the screen will show the game this time.

Oh, more good news: I started printing the pieces I needed! I printed the back of the case as well as another piece to be used with the shoulder buttons. I am going to print the last piece tomorrow, and I will print the buttons when I get the right material for them. This reminds me that I probably should order that hmmmm...