Created
December 1, 2015 10:55
-
-
Save marcotchella/3cbe2114b8c920054a37 to your computer and use it in GitHub Desktop.
Experimento controle de servomotor em 3 posicoes com PWM na 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 servomotor com PWM | |
com placa Intel Galileo GEN 1 | |
mais informacoees: | |
01/12/2015 | |
''' | |
import mraa | |
import time | |
print (mraa.getVersion()) | |
x = mraa.Pwm(9) #seleciona o Pino de GPIO | |
x.period_ms(7) # efetivamente 4,64 ms | |
x.enable(True) | |
x.write(0.30) # periodo ativo 1,4ms | |
time.sleep( 3 ) | |
while True: | |
x.write(0.15) # periodo ativo 0,6ms | |
time.sleep( 3 ) | |
x.write(0.30) # periodo ativo 1,4ms | |
time.sleep( 3 ) | |
x.write(0.45) # periodo ativo 2ms | |
time.sleep( 3 ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mais informçãoes
https://fazerlab.wordpress.com/2015/12/01/intel-galileo-controle-de-servomotor/