Class ServoI2C - GSTCH/SketchMadeEASY GitHub Wiki
Topic | Specification |
---|---|
Description | This class controls a position drive. It controls a 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 an angle. |
Constructor |
ServoI2C(int MinAngle, int MaxAngle, int ServoNr, int BusAddress = 0x40) Parameter MinAngle: Minimum angle of the servoMaxAngle: Maximum angle of the servoServoNr: 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 | MinAngle…MaxAngle |
Samples | ServoI2C* servo = new ServoITC(0, 180, 1; ServoI2C* servo = new ServoITC(0, 180, 1, 0x41) |
Examples | Example 17‐Servo position in relation to a potentiometer |