OrangePI Club
RetrOrangePi 4.1 - Orange Pi Zero GPIO - Getting GPIO to work - Printable Version

+- OrangePI Club (http://orangepi.club)
+-- Forum: International (English) Forums (http://orangepi.club/forumdisplay.php?fid=3)
+--- Forum: *nix Distro (http://orangepi.club/forumdisplay.php?fid=4)
+---- Forum: RetrOrangePi v4 (http://orangepi.club/forumdisplay.php?fid=31)
+----- Forum: SUPPORT (http://orangepi.club/forumdisplay.php?fid=34)
+----- Thread: RetrOrangePi 4.1 - Orange Pi Zero GPIO - Getting GPIO to work (/showthread.php?tid=2515)

Pages: 1 2


RetrOrangePi 4.1 - Orange Pi Zero GPIO - Getting GPIO to work - bharathram21391 - 05-14-2018

Hi everyone,
I am trying get the GPIO controls to work. I activated GPIO controls in RetroOrangePi menu and tried both the NES and TZ options. Nothing happens when I gorund the respective control pins. I tried rebooting, reactivating the option etc. Is there anything wrong I am doing?

Edit: When I reinstall TZ_GAMES_SP it says "ADD the line uinput in the /etc/modules". What exactly should I add to /etc/modules?


RE: RetrOrangePi 4.1 - Orange Pi Zero GPIO - Getting GPIO to work - alexkidd - 05-15-2018

actually anything, it works, BUT only 40-pin GPIO afaik. It's likely to work on the OPi zero as soon as we tweak the python script (hopefully)


RE: RetrOrangePi 4.1 - Orange Pi Zero GPIO - Getting GPIO to work - bharathram21391 - 05-15-2018

Can you give me some guidance so that I can tweak the code myself?


RE: RetrOrangePi 4.1 - Orange Pi Zero GPIO - Getting GPIO to work - alexkidd - 05-15-2018

edit ~/RetrOrangePi/GPIO/drivers/tz_gpio_controller.py and change pin bind (PA1, PD14 etc)


RE: RetrOrangePi 4.1 - Orange Pi Zero GPIO - Getting GPIO to work - bharathram21391 - 05-15-2018

(05-15-2018, 10:58 AM)alexkidd Wrote: edit ~/RetrOrangePi/GPIO/drivers/tz_gpio_controller.py and change pin bind (PA1, PD14 etc)

The button assignments are already correct in that file. I tried grounding PA6 and PA1 (up and down) and nothing happened.


RE: RetrOrangePi 4.1 - Orange Pi Zero GPIO - Getting GPIO to work - alexkidd - 05-15-2018

what does "sudo service tz_gpio status" say?

how exactly are you "grounding" the buttons?


RE: RetrOrangePi 4.1 - Orange Pi Zero GPIO - Getting GPIO to work - bharathram21391 - 05-15-2018

The following is the output of "sudo service tz_gpio status":
Quote:pi@RetrOrangePi:~$ sudo service tz_gpio status
● tz_gpio.service - RETRORANGEPI CONTROLLER
   Loaded: loaded (/lib/systemd/system/tz_gpio.service; enabled)
   Active: active (running) since Tue 2018-05-15 11:51:36 BST; 1h 25min ago
 Main PID: 745 (python)
   CGroup: /system.slice/tz_gpio.service
           └─745 /usr/bin/python /home/pi/RetrOrangePi/GPIO/drivers/tz_gpio_controller.py > /home/pi/RetrOrangePi/GPIO/drivers/tz_gpio_controller.log

May 15 11:51:36 RetrOrangePi systemd[1]: Starting RETRORANGEPI CONTROLLER...
May 15 11:51:36 RetrOrangePi systemd[1]: Started RETRORANGEPI CONTROLLER.

I am manually connecting (touching) the respective pin to ground using a wire.


RE: RetrOrangePi 4.1 - Orange Pi Zero GPIO - Getting GPIO to work - alexkidd - 05-15-2018

this is how i connect, one wire goes from COM to GPIO assigned pin , ground chain wire goes from NO to GND GPIO pin

[attachment=171]

[attachment=172]

NOTE: never tested in OrangePi Zero btw


RE: RetrOrangePi 4.1 - Orange Pi Zero GPIO - Getting GPIO to work - bharathram21391 - 05-15-2018

What difference does it make as long as both pins are connected through a conductor? BTW, connecting using a piece of wire works perfectly on a Raspberry Pi Zero. Is there anything else I need to do? Have I missed a step? Please help.


RE: RetrOrangePi 4.1 - Orange Pi Zero GPIO - Getting GPIO to work - alexkidd - 05-15-2018

We still have to test the Orange pi Zero to be able to help.