How to determine what RaspberryPi you have from Command Line

Do you have a Raspberry Pi, yet aren’t sure exactly what make/model or hardware you have? The following will show you exact details about your device.
From a command line, or SSH session into your Raspberrry Pi, run the following command.

cat /proc/cpuinfo

And look for the line that states – Revision, this can then be cross checked with the list below.


RevisionRelease DateModelPCB RevisionMemoryNotes
BetaQ1 2012B (Beta)?256 MBBeta Board
0002Q1 2012B1.0256 MB
0003Q3 2012B (ECN0001)1.0256 MBFuses mod and D14 removed
0004Q3 2012B2.0256 MB(Mfg by Sony)
0005Q4 2012B2.0256 MB(Mfg by Qisda)
0006Q4 2012B2.0256 MB(Mfg by Egoman)
0007Q1 2013A2.0256 MB(Mfg by Egoman)
0008Q1 2013A2.0256 MB(Mfg by Sony)
0009Q1 2013A2.0256 MB(Mfg by Qisda)
000dQ4 2012B2.0512 MB(Mfg by Egoman)
000eQ4 2012B2.0512 MB(Mfg by Sony)
000fQ4 2012B2.0512 MB(Mfg by Qisda)
0010Q3 2014B+1.0512 MB(Mfg by Sony)
0011Q2 2014Compute Module 11.0512 MB(Mfg by Sony)
0012Q4 2014A+1.1256 MB(Mfg by Sony)
0013Q1 2015B+1.2512 MB(Mfg by Embest)
0014Q2 2014Compute Module 11.0512 MB(Mfg by Embest)
0015?A+1.1256 MB / 512 MB(Mfg by Embest)
a01040Unknown2 Model B1.01 GB(Mfg by Sony)
a01041Q1 20152 Model B1.11 GB(Mfg by Sony)
a21041Q1 20152 Model B1.11 GB(Mfg by Embest)
a22042Q3 20162 Model B (with BCM2837)1.21 GB(Mfg by Embest)
900021Q3 2016A+1.1512 MB(Mfg by Sony)
900032Q2 2016?B+1.2512 MB(Mfg by Sony)
900092Q4 2015Zero1.2512 MB(Mfg by Sony)
900093Q2 2016Zero1.3512 MB(Mfg by Sony)
920093Q4 2016?Zero1.3512 MB(Mfg by Embest)
9000c1Q1 2017Zero W1.1512 MB(Mfg by Sony)
a02082Q1 20163 Model B1.21 GB(Mfg by Sony)
a020a0Q1 2017Compute Module 3 (and CM3 Lite)1.01 GB(Mfg by Sony)
a22082Q1 20163 Model B1.21 GB(Mfg by Embest)
a32082Q4 20163 Model B1.21 GB(Mfg by Sony Japan)
a020d3Q1 20183 Model B+1.31 GB(Mfg by Sony)
9020e0Q4 20183 Model A+1.0512 MB(Mfg by Sony)

The above is obtained from eLinux.org

Using GPIO Pins for Joysticks and Buttons in ReptroPie

Having worked somewhat more than a little bit with PinkyPi and PinkyPi Pro, I had to figure out how to get the buttons and joysticks to work with the display hat buttons. These were wired to GPIO pins on the Raspberry Pi.

This is where mk_arcade_joystick_rpi comes into play, designed to work with buttons and joysticks connected to the GPIO pins on the RaspberryPi.
You can use this in items such as our PinkyPi project, DIY handhelds and Minicades as well as full upright Arcade cabinets!

(Taken from the git page)
It is written for 4 directions joysticks and 8 buttons per player. Using a MCP23017 extends input numbers to 16 : 4 directions and 12 buttons.
It can read one joystick + buttons wired on RPi GPIOs (two on RPi B+ revision) and up to 5 other joysticks + buttons from MCP23017 chips. One MCP23017 is required for each joystick.

But for 1 player and in 2 player need situations, the setup is fairly simpleI


Installation

Download the installation script :

mkdir mkjoystick
cd mkjoystick
wget https://github.com/recalbox/mk_arcade_joystick_rpi/releases/download/v0.1.4/install.sh

Update your system :

sudo sh ./install.sh updatesystem
sudo reboot

You must reboot before the next step :

sudo sh ./install.sh

Loading the Driver

For a single player setup, use the following.

sudo modprobe mk_arcade_joystick_rpi map=1

Or for a 2 player setup, use the following.

sudo modprobe mk_arcade_joystick_rpi map=1,2
Single Player Pin layout
2 Player Pin layout

There are several other options for pin settings and mappings, that can be found in the GitHub for the original project

Auto load the driver at Start up

sudo nano /etc/modules

and add this line at the bottom to load the driver :

mk_arcade_joystick_rpi

Then create the following file /etc/modprobe.d/mk_arcade_joystick.conf :

sudo nano /etc/modprobe.d/mk_arcade_joystick.conf

and add the following line with your mapping configuration :

options mk_arcade_joystick_rpi map=1

Testing and troubleshooting

Before we start into RetroPie, you can do a test and verify the output and functionality of each button.

To test player 1 or a single player setup, use;

jstest /dev/input/js0

To test player 2 on a 2 or more player setup, use;

jstest /dev/input/js1

The same if you have more players, just increase the “js#” value at the end.

You can then see an output of all your buttons and their status, off is default and when the button is active they goto on.

Once everything checks out, load up RetroPi and run through the controller configuration.
You may need to reset your configuration if you have already had an existing controller setup.

Using Etcher to write a Raspberry Pi image to SD card.

Did you download an image or .img file for your Raspberry Pi and you are not sure how to get it running, are you creating a RetroPie game console for Raspberry Pi and you are looking to flash RetroPie to an SD card?

First things first, download balena Etcher and run through its install. Once installed we can continue to flash our image.

Once you have the image you wish to use, such as;

Raspbian or Noobs
RetroPie
OctoPi
Or our PinkyPi images

And then launch balena Etcher and insert your SD card into your computer.
Once Etcher loads, click “Select Image” and browse to the .img file you have and wish to flash to your SD card, in our example I used OctroPi.


Next you can choose your SD card drive, it does attempt to auto detect any SD cards inserted into your PC, so if you have more than one you must specify what device to write to.


Last, click Flash, and it will start writing data to the SD card, depending on the size of the image and speed of your SD card this can take several minutes.

If you wish to do the reverse, and make an image or .img from an existing Raspberry Pi install on an SD card, check out our tutorial on using Win32DiskImager for just that task.

Backing up and Cloning your Raspberry Pi SD card in Windows.

Are you looking to make a backup of your Raspberry Pi, have you spent weeks setting everything up and want to save an emergency copy? Or are you looking to clone your RetroPie build efforts to multiple SD cards?

Check out Win32DiskImager a free Open Source disk image tool for SD cards on Windows.

Once you have Win32DiskImager installed, connect your SD card you wish to save to an img file and launch Win32DiskImager.
First we want to choose where to save our .img file, in my example I store it in C:\img\copy.img
Next we will choose the SD card we wish to read, in my case it’s the E: drive.
Another key item to check is “Read only allocated partitions”, this will read only the in use data on the card and drastically reduce the creation time and file size of our .img backup file.

Once we’ve chosen our destination, where our SD card is and the optional Read Only Allocated Partitions, we can then click the “Read” button at the bottom. This will start the backup process, once it finishes you will now have a bit by bit copy of your Raspberry Pi disk to save for reinstall, cloning or just a general backup of your effort.

If you wish to flash this image to an SD card, or any other image / .img file to an SD card, check out our tutorial on flashing an image to SD.

Crackedconsole Online Shop – Coming Soon!

You may notice, we’ve added a shop to our website, we are currently working on the initial product offerings and should be online within the next 1-2 weeks.
Our first offerings will be based around our PinkyPi project and will include.

Cases
Button Packs
DIY Kits
Full Consoles

Check back soon for updates!