pawi552

lel

Jun 20th, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. import RPi.GPIO as GPIO
  2.  
  3. # Use BCM GPIO references
  4. # instead of physical pin numbers
  5. GPIO.setmode(GPIO.BCM)
  6.  
  7. StepCounter = 0
  8. WaitTime = 0.01
  9. while True:
  10.     GPIO.output(GPIO.26, False)
  11.     GPIO.output(GPIO.18, True)
  12.     sleep(WaitTime)
  13.     GPIO.output(GPIO.18, False)
  14.     GPIO.output(GPIO.22, True)
  15.     sleep(WaitTime)
  16.     GPIO.output(GPIO.22, False)
  17.     GPIO.output(GPIO.24, True)
  18.     sleep(WaitTime)
  19.     GPIO.output(GPIO.24, False)
  20.     GPIO.output(GPIO.26, True)
  21.     sleep(WaitTime)
Advertisement
Add Comment
Please, Sign In to add comment