Dose CoreELEC for Odroid C2 has a plugin like WiringPI? I have python scripts to control the Audiophonics SPC II power module. The scripts send GPIO status that the module reads.
I can’t find is there is a Python support that I could convert the scripts for the C2.
Here is an example of the RPi script I run on LE for RPi:
#!/usr/bin/python # "Audiophonics shutdown script" # " Openelec Version" # "Shutdown: GPIO13 = in, low" # BootOK: GPIO22 = out, high " import sys sys.path.append('/storage/.kodi/addons/virtual.rpi-tools/lib') import RPi.GPIO as GPIO import time import subprocess GPIO.setmode (GPIO.BCM) GPIO.setup (13, GPIO.IN) GPIO.setup ( 22, GPIO.OUT) GPIO.output (22, GPIO.HIGH) PinValueT0 = False while True: #grab the current button state PinValue1 = GPIO.input (13) # check to see if button pushed if PinValue1!= PinValueT0 and PinValue1 == True: subprocess.call ("shutdown -h now", shell = True, stdout = subprocess.PIPE, stderr = subprocess.PIPE) time.sleep (1)