lee ebersole
Posts: 18
Joined: Sat Jul 01, 2017 12:17 am

portable gaming Pi3b project questions

Mon Feb 25, 2019 4:20 pm

hello,
I'm struggling with a few things and thought i'd ask. i appreciate any advice in advance. Boy is it windy here! Yikes!
i'm building a portable (3.7V 3800 mAh RPi PowerPack V1.2) retropie project that will; hopefully, play a few old arcade style games on a 3.5 LCD touch (i don't need the touch)screen, play audio through a tiny speaker from the audio jack, accept a wii nunchuck 12c input for the joystick and C and Z buttons, and accept 2 5V LED arcade buttons/micro switches.
I plan on installing the on/off button from halt state so that i can power down the pie from the outside of my project rather than opening it all the time. I would like the arcade buttons to light up when the unit is turned on. Is this possible? i think i will only have the one GPIO pin(4) available for power at 5v. if it IS possible, what type of resistors should i use? can i somehow power both LEDS from the one pin? is it not worth it? hahah.

thank you,
Lee

scotty101
Posts: 3597
Joined: Fri Jun 08, 2012 6:03 pm

Re: portable gaming Pi3b project questions

Mon Feb 25, 2019 4:52 pm

lee ebersole wrote:
Mon Feb 25, 2019 4:20 pm
I would like the arcade buttons to light up when the unit is turned on. Is this possible? i think i will only have the one GPIO pin(4) available for power at 5v. if it IS possible, what type of resistors should i use? can i somehow power both LEDS from the one pin? is it not worth it? hahah.
Pin 4 is not a GPIO pin. It is just a pin that connects to the 5V supply on the Pi.
You can connect 2 LEDs to this 5V pin. You just wire both LEDs to the same pin. The value of the resistors depends on the LED but you'll be fairly safe with a 330ohm resistor unless the LEDs are something special that require more power.
As for the pins turning on when the unit is turned on. If you connect the LEDs directly to the 5V pin, the LEDs will be on for as long as the Pi is supplied with 5v
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

lee ebersole
Posts: 18
Joined: Sat Jul 01, 2017 12:17 am

Re: portable gaming Pi3b project questions

Mon Feb 25, 2019 5:35 pm

thanks scotty!
just to clarify, since my arcade buttons have 4 connectors a piece, 2 for the LED and 2 for the micro switch, i can just power both the LEDs from pin 4 and both to the same ground pin? or seperate grounds? and then use 4 other GPIO pins for the 2 other microswitches?

lee ebersole
Posts: 18
Joined: Sat Jul 01, 2017 12:17 am

Re: portable gaming Pi3b project questions

Mon Feb 25, 2019 9:20 pm

scotty101 wrote:
Mon Feb 25, 2019 4:52 pm
lee ebersole wrote:
Mon Feb 25, 2019 4:20 pm
I would like the arcade buttons to light up when the unit is turned on. Is this possible? i think i will only have the one GPIO pin(4) available for power at 5v. if it IS possible, what type of resistors should i use? can i somehow power both LEDS from the one pin? is it not worth it? hahah.
Pin 4 is not a GPIO pin. It is just a pin that connects to the 5V supply on the Pi.
You can connect 2 LEDs to this 5V pin. You just wire both LEDs to the same pin. The value of the resistors depends on the LED but you'll be fairly safe with a 330ohm resistor unless the LEDs are something special that require more power.
As for the pins turning on when the unit is turned on. If you connect the LEDs directly to the 5V pin, the LEDs will be on for as long as the Pi is supplied with 5v
thank you scotty101. Would this work do you think?
https://imagizer.imageshack.com/img921/8977/3fvfCl.jpg

scotty101
Posts: 3597
Joined: Fri Jun 08, 2012 6:03 pm

Re: portable gaming Pi3b project questions

Tue Feb 26, 2019 10:25 am

Looks reasonable to me.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

Return to “Gaming”