Adafruit motor shield addon
See also: addon.
Parent - the parent arduino object.
Pins - the pins allocated the addon.
I2CAddress - the i2c address used for accessing this shield.
PWMFrequency - the set PWM frequency for this shield.
Constructor to create motorshieldv2 addon object
arObj - the arduino parent object
propertyname, propertyvalue - optional property name, value pairs. Current known properties are:
I2C address of the motor shield (default 0x60)
PWM Frequency to set on shield (default 1600)
obj - created motorshieldv2 object
a = arduino()
mtr = addon(a, "adafruit/motorshieldv2")
Create a servo object
mObj - the motor shield object
mtrnum - The servo motor number, where 1 is servo on pin "d10" and 2 is a servo on pin "d9"
propertyname, propertyvalue - Optional property name/value pairs to pass to servo object.
Properties are the same as the base servo object.
s - a servo object
a = arduino()
ms = addon(a, "adafruit/motorshieldv2")
# get servo 1 (servo on pin D10)
s = ms.servo(1)
The function if the equivalent of calling the arduino.servo with the D9 or D10 pin has the input pin.
See also: servo.
Create a stepper motor object
mObj - the motor shield object
mtrnum - The stepper motor number (1 or 2)
stepsperrev - Number of steps per revolution.
propertyname, propertyvalue - Optional property name/value pairs to pass to stepper object.
s - a stepper object
Create a dcmotor motor object
mObj - the motor shield object
mtrnum - The motor number (1 - 4)
propertyname, propertyvalue - Optional property name/value pairs to pass to motor object.
s - a dcmotorv2 object
Package: arduino