Advertisement
bal_gennady

opi blink

Sep 14th, 2020
1,065
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. #import the library
  2. from pyA20.gpio import gpio
  3. from pyA20.gpio import port
  4. from time import sleep
  5.  
  6. #initialize the gpio module
  7. gpio.init()
  8. #устанавливаем порт (same as raspberry pi's gpio.setup() function)
  9. gpio.setcfg(port.PA7, gpio.OUTPUT)
  10. #теперь мы что-то делаем (включаем свет на светодеоде)
  11. gpio.output(port.PA7, gpio.HIGH)
  12. #выключаем свет после 2 секунд
  13. sleep(2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement