Javadoc link

AdafruitMotorHat4Pi is a motor driver board that can be used on the Raspberry PI. It can drive 4 DC motors ( implemented in mrl ) or two stepper motors ( yet to be implemented ).

https://www.adafruit.com/product/2348

To use the motor you need thee services running on the PI.

1. The raspi service. http://myrobotlab.org/service/RasPi

2. This service. It represents the board it'self and communicates with the Raspberry PI using the i2c protocol.

3. One to four MotorHat4P services, one for each motor: http://myrobotlab.org/service/MotorHat4Pi

Example code (from branch develop):
# Start the services needed
raspi = runtime.start("raspi","RasPi")
hat = runtime.start("hat","AdafruitMotorHat4Pi")
m1 = runtime.start("m1","MotorHat4Pi")
# Attach the HAT to i2c bus 1 and address 0x60
hat.attach("raspi","1","0x60")
# Use the M1 motor port and attach the motor to the hat
m1.setMotor("M1")
m1.attach("hat")
# Now everything is wired up and we run a few tests
# Full speed forward
m1.move(1) 
sleep(3)
# half speed forward
m1.move(.5)
sleep(3)
# Move backward at 60% speed
m1.move(-.6)
sleep(3)
# Stop
m1.move(0)
# Now you should be able to use the GUI or a script to control the motor
Example configuration (from branch develop):
!!org.myrobotlab.service.config.ServiceConfig
listeners: null
peers: null
type: AdafruitMotorHat4Pi