Wire.h troubles

Hi

Could anyone please explain me why Wire.h library don’t work with Due but it works with mega2560?

When I try to compile (with Due) for example unmodified I2C-scanner by Mr Gammon, I only get error message “twi.c:25:20: fatal error: avr/io.h: No such file or directory” no matter which folder I try to copy such a file.

I’m using very version of Wire-library which is another attachment.

BR

  • Tommi

PS. I’ve tried IDE 1.6.0 and 1.5.8 so far.

I2C_scanner.ino (764 Bytes)

Wire.zip (54 KB)

Hi TommiP,

Each Arduino IDE 1.5.X and 1.6.0 contains its own Wire library under...

...\hardware\arduino\sam\libraries...

If you error comes from...

...C:\Users\xxx\Documents\Arduino\libraries\Wire\utility..

then you should remove that library.

p

Hi Palliser

Yes, that was the fault that I had Wire-library in my C:\Users... directory and it used the old one.

Thanks for help :)

-TommiP