[I asked this question on the Arduino Stack Exchange, and I waited a while and got no answer, so I thought that I'd ask it here!]
I want to integrate Pololu's vl53l0x Time of Flight distance sensor into a project of mine. They created a library to interface with the vl53l0x over I2C, which works great on my Uno. The only problem is that Wire.h doesn't work on the ATtiny85.
TinyWireM is a replacement library for Wire that I think would be compatible. My question is this: how can I go about replacing Wire with TinyWireM? Is it as simple as replacing all instances of Wire with TinyWireM? Is there anything else I need to do to make the library ATtiny85 compatible?
I did try just redefining "Wire" as TinyWireM as shown below:
#include "TinyWireM.h"
#define Wire TinyWireM
Everything compiles and uploads to my ATtiny85 just fine. However, the sensor only appears to be outputting a value of about 7600mm pretty consistently.
Thanks!