I am using the Arduino Trinket 8MHz and Adafruit 16-Channel Servo PWM Driver with Arduino to control 8 haptic LRA motors. Unfortunately, the PWM driver uses I2C, but the Trinket does not. Is there anyway around this?
While trying to compress the code I get the error "TWBR has not been declared in this scope".
The lines that are causing the problems are these (part of the pwmtest sample code):
// save I2C bitrate
uint8_t twbrbackup = TWBR;
// must be changed after calling Wire.begin() (inside pwm.begin())
TWBR = 12; // upgrade to 400KHz!
I have included these libraries:
#include <TinyWireM.h>
#include <USI_TWI_Master.h>
#include <Adafruit_PWMServoDriver.h>
Any help would be greatly appreciated!