Advertisement
AverageMan

Bar Graph Display Scanner

Jan 25th, 2016
507
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. import time
  4. import RPi.GPIO as GPIO
  5.  
  6. GPIO.setmode(GPIO.BOARD)
  7.  
  8. leds = [3,5,7,10,11,13,15,16,18]
  9.  
  10. for led in leds:
  11.     GPIO.setup(led, GPIO.OUT, initial=0)
  12.  
  13. time.sleep(1)
  14.  
  15. while True:
  16.  
  17.     for led in leds:
  18.        GPIO.output(led, 1) # ON
  19.        time.sleep(0.1)
  20.        GPIO.output(led, 0) # OFF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement