common.py 302 B

123456789101112
  1. try:
  2. import RPi.GPIO as GPIO
  3. except RuntimeError:
  4. print("Error importing RPi.GPIO! This is probably because you need superuser privileges. You can achieve this by using 'sudo' to run your script")
  5. GPIO.setmode(GPIO.BCM)
  6. right_pin = 25
  7. left_pin = 23
  8. hard_pin = 24
  9. fwd_pin = 17
  10. back_pin = 18