@@ -0,0 +1,602 @@
+# Start the services needed%0Araspi = Runtime.start(%22raspi%22,%22RasPi%22)%0Ahat = Runtime.start(%22hat%22,%22AdafruitMotorHat4Pi%22)%0Am1 = Runtime.start(%22m1%22,%22MotorHat4Pi%22)%0A# Attach the HAT to i2c bus 1 and address 0x60%0Ahat.attach(%22raspi%22,%221%22,%220x60%22)%0A# Use the M1 motor port and attach the motor to the hat%0Am1.setMotor(%22M1%22)%0Am1.attach(%22hat%22)%0A# Now everything is wired up and we run a few tests%0A# Full speed forward%0Am1.move(1) %0Asleep(3)%0A# half speed forward%0Am1.move(.5)%0Asleep(3)%0A# Move backward at 60%25 speed%0Am1.move(-.6)%0Asleep(3)%0A# Stop%0Am1.move(0)%0A# Now you should be able to use the GUI or a script to control the motor%0A

Create MotorHat4Pi.py