hhk7734 / Odroid.GPIO

Odroid.GPIO
MIT License
6 stars 1 forks source link

license pypi language

Odroid.GPIO

Installation

sudo add-apt-repository -y ppa:hardkernel/ppa \
&& sudo apt update
sudo apt install -y python3 python3-dev python3-pip \
    odroid-wiringpi libwiringpi-dev
python3 -m pip install -U --user pip Odroid.GPIO

Blink example

import Odroid.GPIO as GPIO
# You can also use 'import RPi.GPIO as GPIO'.
import time

'''
GPIO.BCM == GPIO.SOC
GPIO.BOARD
GPIO.WIRINGPI
'''
GPIO.setmode(GPIO.BOARD)

GPIO.setup(13, GPIO.OUT)

while True:
    GPIO.output(13, GPIO.HIGH)
    time.sleep(1)
    GPIO.output(13, GPIO.LOW)
    time.sleep(1)

Changelog

Ref: CHANGELOG