Author Topic: raspberry pi - RPI - raspi - GPIO pinout projects  (Read 4372 times)

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
raspberry pi - RPI - raspi - GPIO pinout projects
« on: July 03, 2017, 12:47:40 AM »
please post your config, building, scripts and settings.
using GPIO pinout of Raspberry family to have the joy of emulator systems.

an example:
GPIO3 (GPIO Pin 3) means physically Pin 5



official ovierview from Raspberry Pi Foundation:

physical numbering of pins





overview of GPIO pinout





« Last Edit: November 19, 2018, 03:01:53 AM by hermine.potter »
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: raspberry pi - RPI - raspi - GPIO pinout projects
« Reply #1 on: July 03, 2017, 01:01:31 AM »
>using a switch to poweron / poweroff the RPI

-you need a switch (power or reset button from a old pc)

-connect the two sockets of switch to PIN 5 (GPIO3) and PIN 6 (GROUND):

-create a script called 'shutdown_button.py'
(Thanks to Alex)
Code: [Select]
#! /usr/bin/env python
import os
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
# GPIO3 (pin 5) set up as input. It is pulled up to stop false signals
GPIO.setup(3, GPIO.IN, pull_up_down=GPIO.PUD_UP)
try:
    while True:
        # wait for the pin to be sorted with GND and, if so, halt the system
        GPIO.wait_for_edge(3, GPIO.FALLING)
        # shut down the rpi
        os.system("/sbin/shutdown -h now")
except:
    GPIO.cleanup()

-put it on your RPI ( i've created a own folder : /home/pi/RetroPie/myscripts )

-edit file : /etc/crontab

-set this line at the end, depending to your folder and path 
Code: [Select]
@reboot root /usr/bin/python /home/pi/RetroPie/myscripts/shutdown_button.py

-reset your RPI



if RPI is on and you press the button, the RPI shutdow.
If the RPI is already off, RPI turns on again.

« Last Edit: November 19, 2018, 03:03:28 AM by hermine.potter »
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: raspberry pi - RPI - raspi - GPIO pinout projects
« Reply #2 on: July 03, 2017, 01:42:37 AM »
>run a pc fan:

-you need a pc fan

-connect the red cable of pc fan to PIN 2 (5V)
-connect the black cable of pc fan to PIN 14 (GROUND)



with a pc fan, you can cool your RPI.
there are very small pc fans available (20 x 20 x 10 mm) from Sunon (mc20100v2-a99, gm0501pfb3-8)

« Last Edit: November 19, 2018, 03:03:13 AM by hermine.potter »
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: raspberry pi - RPI - raspi - GPIO pinout projects
« Reply #3 on: July 03, 2017, 10:55:35 AM »
here is an ebay  #   191830512156   
for full heat sink and fan kit  only 7-bucks

ran heat tests over ssh putty 
and it is amazing the diff in cor temp
before maxing out 83 85c  very quickly
with kit,,,  full on  shmup  madness with no hotter than 56c  amazing
ready to put it in my new barcade and feel good about it running 24-7

fan run on pin 4-6

i use am using  floob  build with updated AM-& ES   shudown

and will add a button for start up to.. pin 5 & 14   since my # 6-ground is in use
should work..
help a friend....