Created
November 20, 2015 12:39
-
-
Save marcotchella/a1e02891bc6a48e86bf6 to your computer and use it in GitHub Desktop.
Experimento controle de LED com PWM com placa Intel Galileo GEN 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
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