Skip to content

Instantly share code, notes, and snippets.

@marcotchella
Created November 20, 2015 12:39
Show Gist options
  • Save marcotchella/a1e02891bc6a48e86bf6 to your computer and use it in GitHub Desktop.
Save marcotchella/a1e02891bc6a48e86bf6 to your computer and use it in GitHub Desktop.
Experimento controle de LED com PWM com placa Intel Galileo GEN 1
'''
Experimento controle de LED com PWM
com placa Intel Galileo GEN 1
mais informações:
https://fazerlab.wordpress.com/2015/11/20/intel-galileo-hello-world-com-python-e-linux/
20/11/2015
'''
import mraa
import time
x = mraa.Pwm(9) #seleciona o Pino de GPIO
x.period_us(700) # configura o periodo em 700 uS
x.enable(True)
value= 0.0
while True:
x.write(value)
time.sleep(0.05)
value = value + 0.01
if value >= 1:
value = 0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment