Accessing GPIO pins on the Odroid U3+ Linux in Bash/Python
Bash Tutorial
To learn how to access the GPIO pins on the Odroid U3+ on a Linux system, I added a red LED to the GPIO pins, and the objective is to light that on. Here are the steps to do that:
Connect a low voltage LED, red preferably. As shown in the photo:

Log in as root using
su -.Set the pins indicated in the photo above as output:
cd /sys/class/gpio echo 204 > export cd gpio204 echo out > directionWrite a bash loop to light on and off the LED:
while true; do echo 0 > value sleep 1 echo 1 > value sleep 1 done
GPIO Schematic
Simple schematic of the GPIOs as viewed from the angle of the photo above:
| 1.8V | UART RX | UART TX | 5V |
| GPIO199 | GPIO200 | GPIO204 | GND |
It would be great if someone creates a simple python or java library to access these, right?
Edit:
I have created the simple python library, it is over at GitHub here:
https://github.com/zaiddabaeen/gpioU3P
Python Tutorial
A simple python library to control the three GPIO pins on the Odroid U3+.
Clone the library using:
git clone https://github.com/zaiddabaeeen/gpiou3p
Usage
Simply import the library
import gpiou3p as gpio
Writing to the pin
Setup the pin directions
gpio.setup(gpio.PIN.GPIO199, gpio.DIRECTION.OUT)Write to the pin
gpio.write(1, gpio.PIN.GPIO199)
Reading the pin
Setup the pin directions
gpio.setup(gpio.PIN.GPIO199, gpio.DIRECTION.IN)Read the pin
gpio.read(gpio.PIN.GPIO199)
Check example.py file for an example case that blinks an LED.
You need sudo privileges to be able to edit the GPIO pins on the Odroid U3+


