I2Cwrapper v0.3.0
Generic framework for Arduino I2C target devices
|
Firmware module for the I2Cwrapper firmare. More...
Firmware module for the I2Cwrapper firmare.
Provides I2C access to servo motors connected to the target device. Mimicks the standard Servo library functions.
Copyright (c) 2022 juh
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
Functions | |
bool | validServo (int8_t s) |
log ("ServoI2C module enabled.\n") | |
bufferIn | read (p) |
servos[numServos] | attach (p) |
bufferOut | write (numServos++) |
log (numServos) | |
bufferIn | read (min) |
bufferIn | read (max) |
servos[numServos] | attach (p, min, max) |
bufferIn | read (value) |
servos[unit] | write (value) |
servos[unit] | writeMicroseconds (value) |
for (uint8_t i=0;i< numServos;i++) | |
Variables | |
const uint8_t | maxServos = 4 |
Servo | servos [maxServos] |
uint8_t | numServos = 0 |
case | servoAttach1Cmd |
break | |
case | servoAttach2Cmd |
int | min |
int | max |
case | servoDetachCmd |
case | servoWriteCmd |
case | servoWriteMicrosecondsCmd |
case | servoReadCmd |
case | servoReadMicrosecondsCmd |
case | servoAttachedCmd |
for | ( | ) |
log | ( | "ServoI2C module enabled.\n" | ) |
log | ( | numServos | ) |
bufferIn read | ( | p | ) |
bool validServo | ( | int8_t | s | ) |
break |
int max |
const uint8_t maxServos = 4 |
int min |
numServos = 0 |
case servoAttach1Cmd |
case servoAttach2Cmd |
case servoAttachedCmd |
case servoDetachCmd |
case servoReadCmd |
case servoReadMicrosecondsCmd |
Servo servos[maxServos] |
case servoWriteCmd |
case servoWriteMicrosecondsCmd |