Using GY-521 (gyroscope + accellerometer) with Attiny85

Hi all, I have a working prototype on an UNO but when compiling for the ATTINY85 I get compiler errors as the WIRE.h library isn’t compatible.

What changes or libraries would you need to use to make this work?

My compiler error is as follows:

In file included from (sketch file) sleepwalking watch doesnt work on attiny85.ino:7:
In file included from (personal library file) I2Cdev/I2Cdev.h:86:
(library file) Wire/Wire.h:61:20: error: virtual function ‘write’ has a different return type (‘size_t’ (aka ‘unsigned int’)) than the function it overrides (which has return type ‘void’)

virtual size_t write(const uint8_t *, size_t);
(arduino core file) /tiny/cores/tiny/Print.h:75:18: note: overridden virtual function is here
virtual void write(const uint8_t *buffer, size_t size);

Sleep_Walking_Watch_Prototype.ino (4.22 KB)

There is a special Wire library TINYWIREM for the ATTINY85: