technoblogy / tiny-i2c

Minimal I2C master routines for all AVR microcontrollers.
161 stars 39 forks source link

Won't compile #1

Closed sheffieldnikki closed 5 years ago

sheffieldnikki commented 5 years ago

Various things aren't defined (PIN_USI_SCL, DDR_USI, etc) as the code stands, so it doesn't compile.

Does TinyI2CMaster.cpp need something like #include "usi_io.h" added at the top?

DirtyEngineer commented 5 years ago

Have you tried adding

int const sda = 0;
int const scl = 2;

To your sketch?

Also be sure that you are using Spence Konde ATTinyCore or you will have issues compiling.

sheffieldnikki commented 5 years ago

Thanks, it was indeed that I was using damellis/attiny instead of SpenceKonde/ATTinyCore. Could a note be added in the README or top of TinyI2CMaster.cpp to that effect?