Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GPIO functions
#1
Hello guys

I have an orange pi one and a pi pc that i want to use them in a bartop.
I'm running retrorange pi 4.2 full, and my image is fully loaded so i would prefer not to start over...

So my general questions are:

1) With the OPi One, does the hdmi carries sound? I intend to use those dhmi to vga+3.5mm converter thing, so i can get sound from the board. Any other solution besides that?
2) If i want to use an usb sound card, how can i configure it?

3) I am using a zero delay set, but i want to use gpio functions:
 -- use a pushbutton to start a shutdown sequence after 3 seconds pressed. Is there a script for that? How can i write it and use? On wich GPIO's?
(the same goes for the OPi PC)
-- Use GPIO to set volume up and down, and on what gpio?

Really apreciate any help.
Thanks
Reply
#2
1. Yes, HDMI carries sound. We never tested VGA adapters so we cannot confirm if sound will work out of the box. There is a tutorial on internet (armbian forum) to solder the board and enable analog sound.
2. You can run the Bashtool from RetrOrangePi submenu and choose the enable usb audio option. It changes parameters on /etc/asound.conf and /home/pi/.asoundrc so you can fix something that wont work.
3. There are scripts to use the "power" button on most orange pi's with functions restart, reboot and shutdown. Check files in /home/pi/RetrOrangePi/Power Button/ folder for the syntax.
There are only scripts to enable GPIO as controller, but checking /home/pi/RetrOrangePi/GPIO folder might be useful to try to add your own configs.
Reply
#3
Hello. Thanks for the reply.

After assemble, i can inform that:
1- Yes, hdmi to vga+3.5mm audio converter works fine. The problem is an amazingly loud buzz in the output sound.
2- No need (yet)
3- Well, i soldered 2 wires from the pushbutton located in the orange pi to an external pushbutton and assigned to do shutdown, thanks.

But now i face another problem (besides the sound issue): I use a 7 inch lcd display, but the image is a lot bigger than the screen, which means i only see about 70% of the image... Is there a way to put the correct resolution so the image fits in the screen?
Reply
#4
If your LCD is connected to hdmi , run ‘sudo h3disp’ from command line and then rerun with the correct parameters, a smaller resolution like 800x480 should work. Try to do this from ssh so if you get a black screen, you’ll be able to revert .
Reply
#5
(06-10-2019, 11:21 PM)alexkidd Wrote: If your LCD is connected to hdmi , run ‘sudo h3disp’ from command line and then rerun with the correct parameters, a smaller resolution like 800x480 should work. Try to do this from ssh so if you get a black screen, you’ll be able to revert .

Hi. Unfortunatly that didnt work... i tried m32, m33 but none helped.. i'm thinking maybe is the screen or the converter...
Reply
#6
If you use an adapter , add -d to the command. Maybe it helps
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  GPIO controls VeteranGamer 6 2,128 04-18-2019, 07:18 PM
Last Post: canadien
  Don't Working GPIO Joypad on OPi Zero... intelis 3 1,090 12-04-2018, 02:30 PM
Last Post: intelis
  Genesis/MegaDrive Controller GPIO dee098 3 1,238 08-19-2018, 11:20 AM
Last Post: alexkidd

Forum Jump:


Users browsing this thread: 1 Guest(s)