@@ -0,0 +1,1153 @@
+# CamJam EduKit 3 - Robotics%0A# Worksheet 3 %E2%80%93 Driving and Turning%0A%0Aimport RPi.GPIO as GPIO # Import the GPIO Library%0Aimport time # Import the Time library%0A%0A# Set the GPIO modes%0AGPIO.setmode(GPIO.BCM)%0AGPIO.setwarnings(False)%0A%0A# Set variables for the GPIO motor pins%0ApinMotorAForwards = 10%0ApinMotorABackwards = 9%0ApinMotorBForwards = 8%0ApinMotorBBackwards = 7%0A%0A# Set the GPIO Pin mode%0AGPIO.setup(pinMotorAForwards, GPIO.OUT)%0AGPIO.setup(pinMotorABackwards, GPIO.OUT)%0AGPIO.setup(pinMotorBForwards, GPIO.OUT)%0AGPIO.setup(pinMotorBBackwards, GPIO.OUT)%0A%0A# Turn all motors off%0Adef StopMotors():%0A    GPIO.output(pinMotorAForwards, 0)%0A    GPIO.output(pinMotorABackwards, 0)%0A    GPIO.output(pinMotorBForwards, 0)%0A    GPIO.output(pinMotorBBackwards, 0)%0A%0A# Turn both motors forwards%0Adef Forwards():%0A    GPIO.output(pinMotorAForwards, 1)%0A    GPIO.output(pinMotorABackwards, 0)%0A    GPIO.output(pinMotorBForwards, 1)%0A    GPIO.output(pinMotorBBackwards, 0)%0A%0A# Turn both motors backwards%0Adef Backwards():%0A    GPIO.output(pinMotorAForwards, 0)%0A    GPIO.output(pinMotorABackwards, 1)%0A    GPIO.output(pinMotorBForwards, 0)%0A    GPIO.output(pinMotorBBackwards, 1)%0A%0AGPIO.cleanup()%0A

Create Cod3-driving.py