Class Servo360I2C - GSTCH/SketchMadeEASY GitHub Wiki
Topic | Specification |
---|---|
Description | This class controls a rotation drive. It controls a continuously rotating servo using Adafruit servo/PWM shield over I2C. Up to 62 are stackable. Sketch Made EASY includes an auto map from input to actuator. The class map the range of the assigned input (via relation) to a speed. |
Constructor |
MotorServo360I2C(int ServoNr, int BusAddress) Parameter ServoNr: Servo 0 to 15 of the shieldBusAddress: Optionally with the value 0x40. This is the shield's default I2C address. If several shields are stacked, the address must be changed (by soldering). |
Range | 0…255 |
Samples | Servo360I2C* servo = new Servo360ITC(1); Servo360I2C* servo = new Servo360ITC(1, 0x41) |
Examples | 12-Servo360 controlled by a Joystick |
Advanced | Some servos don’t stop. They need an adjustment of the pulse duration. For this it exist a constructor. MotorServo360I2C(int ServoNr, int MaxForwardMillis, int StopMillis, int MaxBackwardMillis, int BusAddress) Parameter MaxForwardMillis: Default 2000msStopMillis: Default 1500msMaxBackwardMillis: Default 1000ms |