orange pi and python

Starting with Orange Pi and Python # 2

Starting with Orange Pi and Python # 2

This video show us how we can start with python and a little script, so i hope you enjoy this, and don’t forget suscribe to my youtube channel!

Este video nos muestra como empezar a codificar en python y orange pi, es un ejemplo muy simple pero muy util, espero que lo disfrutes!, y no olvides suscribirte a mi canal de youtoube.

#!/usr/bin/env python
#sorry the first line must be the path for the compiler

#imports for start using the libraries
from pyA20.gpio import gpio
from pyA20.gpio import port
from time import sleep

#init
gpio.init()


#configuring the digital port like output
gpio.setcfg(port.PG7, gpio.OUTPUT)

#turn on the led....
gpio.output(port.PG7, gpio.HIGH)

#wait 2 seconds
sleep(2)


#put the led off, and that's all!
gpio.output(port.PG7, gpio.LOW)