madsci1016 / Arduino-EasyTransfer

An Easy way to Transfer data between Arduinos
http://www.billporter.info/easytransfer-arduino-library/
320 stars 114 forks source link

failed to find document avr/io.h #18

Open Somnus0737 opened 6 years ago

Somnus0737 commented 6 years ago

Oh,hello.I followed the guidance to put SoftEasyTranfer.h in the libraries,but the Arduino IDE couldn't find the avr/io.h when I compiled my project.What's the problem?Could you give me some advices?

per1234 commented 6 years ago

Which board do you have selected in the Tools > Board menu?

Somnus0737 commented 6 years ago

nodemcu

Somnus0737 commented 6 years ago

Actually,I want to connect nodemcu to arduino uno by EasyTransfer

beicnet commented 6 years ago

@per1234 Can you help us with this?

I wish to run only I2C communication on WeMos D1 mini as master and Arduino Uno as slave, but like above described, I got compile error for the ESP8266 platform too, "fatal error: avr/io.h: No such file or directory"

per1234 commented 6 years ago

It appears the #include <avr/io.h> is completely unnecessary. At a quick glance, I don't see any reason why the actual code of the library wouldn't work on any architecture that provides the standard Arduino library APIs.

So just comment out that line of the library code.

If you find the library works (not just compiles, actually works) with ESP8266 after that change, please comment here and I'll submit a pull request to remove the unnecessary avr/io.h dependencies.

beicnet commented 6 years ago

@per1234 Yes, commenting it out did the trick. But, the example for the I2C not working for me. They are compiling fine, but the slave device (Uno) is not apearing on the I2C bus. I2C scanner says, "No I2C devices found", even tried with 2x Unos.

Any help would be appreciated!

p.s. I put "EasyTransfer_RX_Example" as slave and "EasyTransfer_TX_Example" as master from the EasyTransferI2C example folder, is that correct?

per1234 commented 6 years ago

Talking about an potentially unnecessary incompatibility with non-AVR architectures is reasonable for an issue tracker but now this is going more in the direction of a support request for your project. Further discussion on that topic is probably more appropriate for the Arduino Forum: http://forum.arduino.cc/

EDIT 2018-06-23: Forum thread link: http://forum.arduino.cc/index.php?topic=554637

beicnet commented 6 years ago

@per1234 Yes, I know that, but the included I2C examples are not working even with 2x Arduino Unos using Arduino IDE 1.8.2.

ShadGates commented 5 years ago

FYI: EasyTransferI2C.h has the same problem, several unneeded includes at the top of the file, including the avr/io.h mentioned in this issue.