Translations of this page:
This is an old revision of the document!
About this Article
$sudo apt-get update $sudo apt-get install python-dev $wget http://dl.linux-sunxi.org/users/tom/pySUNXI-0.1.12.tar.gz $tar zxf pySUNXI-0.1.12.tar.gz $sudo python setup.py install
#!/usr/bin/env python import SUNXI_GPIO as GPIO import time RED_LED = GPIO.PD0 GPIO.init() GPIO.setcfg(RED_LED, GPIO.OUT) while True: GPIO.output(RED_LED, GPIO.HIGH) time.sleep(1) GPIO.output(RED_LED, GPIO.LOW) time.sleep(1)
$chmod +x blink.py $sudo ./blink.py
The red led is blinking in cycle time.