Guest User

Untitled

a guest
Jan 17th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. GPIO.setmode(GPIO.BOARD)
  2. GPIO.setup(11, GPIO.OUT)#To L239 Pin2
  3. GPIO.setup(12, GPIO.OUT) #To L239 Pin7
  4. GPIO.setup(07, GPIO.OUT) #L293 Enable Pin1
  5. pwm=GPIO.PWM(07, 800) #Seto GPIO No.7 as PWM at 800Hz
  6.  
  7. def F():
  8. # Wheels Forward
  9. pwm.start(100.0)
  10. pwm.ChangeDutyCycle(100.0)
  11. GPIO.output(11, True)
  12. GPIO.output(12, False)
  13. GPIO.output(07, True) #Enable Pin ON
Add Comment
Please, Sign In to add comment