Posts by Przemo

    Hi guys,

    I just wanted to let you know that I spent around 4 hrs to make my new OnOFF SHIM running on my RPi 3 with LibreELEC 12.0.2. I tried to use the scripts described in the thread [How to] Pimoroni OnOff SHIM with LibreELEC but it didn't work.

    First of all, I had troubles to run the shell scripts because the GPIO points were incorrect.

    Secondly, when making a Python script, I had troubles with RPi.GPIO which was replaced by gpiozero.


    Ad.1.

    While preparing a shell script, I found out that in order to define the GPIO point correctly, you have to add a value of 512 to the number of the GPIO point.


    So my shutdown.sh file looks like this now:

    And after it shuts down RPi, it cuts of the power. So there is a success.


    Ad.2.

    There was a problem with python script. As the script itself, when running from shell, worked like a charm- if I clicked the button, it would shut down the environment. But when the script was executed automatically, there were some errors in the systemctl logs.

    Anyway, my off.py script looks like this now:

    The most important thing was to put that os.environ['LG_WD'] thing so that the internal processes got writable rights to operate in temporary folder and so the script could start running in the background.


    Finally, I created the autostart.sh and entered a line:

    Code
    ( /usr/bin/python /storage/.config/off.py ) &


    So now, I can use the button to shut down the system - the python script initiates the shutdown pocess which cuts of the power eventually. If I use the option within the libreELEC environment, RPi runs the shell script directly.


    I hope this decent post will help someone else who uses the OnOff SHIM by Pimoroni.


    Best Reagards,

    Przemek

    Hello lads,

    I've just installed the LE 12 on my Raspberry Pi 5 and it works like charm with movies. However, I'd like to use it also as a retro gaming platform. I bought a special USB-DB9 stick, which allows me to use my old C64 joystick. And it works fine on Win 11 and the emulator of C64.

    However, the LE12 doesn't seem to have any mapping and doesn't see this HID device.


    The lsusb shows such a log:

    Bus 003 Device 003: ID 0810:e501 Personal Communication Systems, Inc. SNES Gamepad


    While the dmesg also shows that the hardware is recognized:

    [  345.253118] usb 3-1: new low-speed USB device number 3 using xhci-hcd
    [  345.414097] usb 3-1: New USB device found, idVendor=0810, idProduct=e501, bcdDevice= 3.00
    [  345.414104] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [  345.414108] usb 3-1: Product: STD_2BTN_USB-JOY
    [  345.414111] usb 3-1: Manufacturer: husak.pl
    [  345.414113] usb 3-1: SerialNumber: 0000
    [  345.449925] input: husak.pl STD_2BTN_USB-JOY as /devices/platform/axi/1000120000.pcie/1f00300000.usb/xhci-hcd.1/usb3/3-1/3-1:1.0/0003:0810:E501.0003/input/input5
    [  345.450045] hid-generic 0003:0810:E501.0003: input,hidraw2: USB HID v1.10 Gamepad [husak.pl STD_2BTN_USB-JOY] on usb-xhci-hcd.1-1/input


    Now, what should I install and perform the proper mapping of the joystick's fire and axis buttons? I've seen that there are tools like jstest but it's not available here. I've installed the Atari 2600 add-on but I can't even configure it.

    I assume that I need to catch all the buttons through the jstest and then perform a proper mapping in some .xml files. Later on, I need to use that xml file in the emulator app.

    Can anyone guide me with the location of the files and tell me, what should I do?

    Thanks and best regards to the Community,

    Przemek