mariuszb Posted May 27, 2016 Posted May 27, 2016 Hi, We can access port usig eg. echo 1 >/sys/class/leds/green_led/brightness (or red_led) echo 1 > /sys/devices/platform/gpio_sw.0/gpio_sw/PA6/data (other ports) My question is as follows: How to access to ports using C language ? Is WiringOP (This method works ) is preferred or another method is better? #define LED 0 wiringPiSetup () ; pinMode (LED, OUTPUT) ; digitalWrite (LED, HIGH) ; // On
nopnop2002 Posted June 15, 2016 Posted June 15, 2016 You can access GPIO using these. orangepi_PC_gpio_pyH3 https://github.com/duxingkei33/orangepi_PC_gpio_pyH3.git WiringPi-Python(WiringPi-Python-OP) https://github.com/lanefu/WiringPi-Python-OP.git BTW OPI-PC has 28 of GPIO which can control. Why is there only 19 of /sys/devices/platform/gpio_sw.*?
Recommended Posts