thexeno / HardWire-Arduino-Library

A spinoff of the Arduino Wire library, implements a fully controllable I2C slave.
28 stars 4 forks source link

Compilation error #3

Closed kb- closed 7 years ago

kb- commented 7 years ago

Hi, I'm getting compilation errors when I try using HardWire with the Arduino Wire tutorial scripts. I attached the log files. Mega2560 compilation error.txt Nano Zero compilation error.txt

thexeno commented 7 years ago

Hi, for the Mega, seems just a lack on finding the correct declarations.

For the Zero, there are probably different registers used in the MCU hardware, so over the previous declaration errors, you will have compatibility issues. It has a completely different MCU architecture, the TWI library already available may be very different from the Atmega series MCUs. (EDIT: I confirm, the I2C module is handled very differently)

Can you attach the entire project for the Mega at least?

kb- commented 7 years ago

I only tried the short example from the Wire library. I know the Zero is handled differently. I hoped finding a library behaving more consistently than Wire. For example, the Zero sometimes doesn't like communicating in master mode if the optional address is set.

HardWire_master_reader.zip

thexeno commented 7 years ago

Hi,

try with the latest commit. It is not fixed for the Zero, but now should work for all the previously supported by the classic Wire.

Let me know ;)

kb- commented 7 years ago

Hi, it's working for the Mega. Sorry for the late response.

It's still not compiling for the Zero. The error messages are different from last time. error.txt