Class MotorI2C - GSTCH/SketchMadeEASY GitHub Wiki
Topic | Specification |
---|---|
Description | This class controls a DC motor by an Adafruit Motor Shield Version 2. This is able to control up to 4 motors. It’s connected via I2C Bus. Up to 32 are stackable. It's the only motor shield to control 4 (or more) motors with an Arduino UNO. |
Constructor |
MotorI2C(int MotorNr, int BusAdddress) Parameter MotorNr: Motor 1 to 4 of the shieldBusAdddress: Optionally with the value 0x60. This is the shield's default I2C address. If several motor shields are stacked, the address must be changed (by soldering). |
Range | 0…255 |
Samples | MotorI2C* motor = new MotorI2C(1); MotorI2C* motor = new MotorI2C(1, 0x61); |
Examples |
05‐Motor fix speed, direction‐switch 06‐Motor variable speed, direction‐switch 07‐Motor variable speed, direction‐ and main‐switch 08‐Motor toggles between limit switches 09‐Motor toggles between limit switches, main switch 10‐Main Motor turns between limit switches, second follows 11-Two motors, one turns after the other 15-RemoteControl of a motor with an App |