Another RetroPie console
Parts:
Audio amplifier: AVT1498
Display: Waveshare 800x480 5inch HDMI LCD V2
DC-DC Step-UP 5Volt: POLOLU-2565
(for Li-Po battery) - not required, if no Li-Po battery
Li-Po Battery charger: MikroElektronika MIKROE-1198
(for Li-Po battery) - not required, if no Li-Po battery
Enclosure: BOPLA ATPH 1850-150
Keyboard: Genius GK-100008 SlimStar i222
C0 | C1 | C2 | C3 | C4 | C5 | C6 | C7 | C8 | C9 | C10 | C11 | C12 | C13 | C14 | C15 | C16 | C17 | |
R0 | PAUSE | q (left shoulder) | w (right shoulder) | e | r | u | i | o | p (pause) | SCROLL | n/a | KP 7 | KP 8 | KP 9 | KP + (vol+) | n/a | LAUNCH MAIL | n/a |
R1 | POWER | TAB | CAPS | F3 | t | y | ] | F7 | [ | n/a | BS | KP 4 | KP 5 | KP 6 | ABNT C2 | LSHIFT | LWIN | BROWSER FAVORITES |
R2 | n/a | a (y) | s (x) | d | f | j | k | l | ; | n/a | \ | KP 1 | KP 2 | KP 3 | KP ENTER | RSHIFT (select) | n/a | RWIN |
R3 | n/a | ESC (exit) | OEM_102 | F4 | g | h | F6 | n/a | LALT | F11 | SPACE | KP 0 | KP . | UP (up) | VOLUME DOWN | BROWSER STOP | LAUNCH APP1 | |
R4 | RCTRL | z (b - back) | x (a - ok) | c | v | m | , | . | \ | n/a | ENTER (start) | NUM LK | KP / | KP * | MEDIA PLAY PAUSE | VOLUME UP | BROWSER BACK | MEDIA STOP |
R5 | n/a | OEM PA1 | 0xff | 0xff | b | n | OEM PLUS | MENU | / | LCTRL + RALT | F12 | DOWN (down) | RIGHT (right) | KP - (vol-) | LEFT (left) | MEDIA NEXT TRACK | BROWSER REFRESH | LAUNCH APP2 |
R6 | LCTRL | ` | F1 (menu) | F2 | 5 | 6 | = | F8 | - | n/a | F9 | DEL | INS | PG UP | HOME | MEDIA PREV TRACK | VOLUME MUTE | BROWSER HOME |
R7 | F5 | 1 | 2 | 3 | 4 | 7 | 8 | 9 | 0 | n/a | F10 | POWER | n/a | PG DOWN | END | LAUNCH MEDIA SEL | BROWSER SEARCH | n/a |
Buttons:
Schurter 1241.1104.7095 - big (red)
Highly PB6136FBL-13 - medium (red or green - led)
Highly PB6142FL-13 -small (red or green - led)
D-Pad from cheap PC-Gamepad
Keyboard controller from Genius GK-100008 SlimStar i222 |
Display: Waveshare 800x480 5inch HDMI LCD V2 (for better viewing angle installed upside down) |
Raspberry Pi 2 Model B |
Shutdown button:
$ mkdir Scripts
$ cd Scripts
$ touch shutdown_pi.py
$ nano shutdown_pi.py
#!/bin/python
# Simple script for shutting down the raspberry Pi at the press of a button.
# by Inderpreet Singh
import RPi.GPIO as GPIO
import time
import os
# Use the Broadcom SOC Pin numbers
# Setup the Pin with Internal pullups enabled and PIN in reading mode.
GPIO.setmode(GPIO.BCM)
GPIO.setup(3, GPIO.IN, pull_up_down = GPIO.PUD_UP)
# Our function on what to do when the button is pressed
def Shutdown(channel):
os.system("sudo shutdown -h now")
# Add our function to execute when the button pressed event happens
GPIO.add_event_detect(3, GPIO.FALLING, callback = Shutdown, bouncetime = 2000)
# Now wait!
while 1:
time.sleep(1)
$ sudo nano /etc/rc.local
sudo python /home/pi/Scripts/shutdown_pi.py &
The "&" at the end of the command tells it to run the process in the background. If you omit it, then your login prompt probably will not appear.
Config.txt (Waveshare 800x480 5inch HDMI LCD V2):
# For more options and information see
# http://www.raspberrypi.org/documentation/configuration/config-txt.md
# Some settings may impact device functionality. See link above for details
#avoid_safe_mode=1
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16
# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720
# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1
# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=2
hdmi_mode=87
#cvt_width=2560 (width in pixels)
#cvt_height=1440 (height in pixel)
#cvt_framerate=60 (framerate in Hz)
#cvt_aspect=3 (aspect ratio 1=4:3, 2=14:9, 3=16:9, 4=5:4, 5=16:10, 6=15:9)
#cvt_margins=0 (0=margins disabled, 1=margins enabled)
#cvt_interlace=0 (0=progressive, 1=interlaced)
#cvt_rb=1 (reduced blanking, only valid for 60 Hz vertical)
hdmi_cvt 800 480 60 6 0 0 0
display_rotate=2
start_file=start_x.elf
fixup_file=fixup_x.elf
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
hdmi_drive=1
#hdmi_ignore_edid_audio=1
# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4
# uncomment for composite PAL
#sdtv_mode=2
#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800
# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=off
#dtparam=i2s=on
dtparam=spi=on
# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
gpu_mem_256=128
gpu_mem_512=256
gpu_mem_1024=256
overscan_scale=1
Comments
Post a Comment