Hi recently encounter a problem where I am using the esp28666 nodemcu lua v2 2 to program a youtube live subscriber counter, however upon uploading I get an error saying
That error indicates that the jm_wire library is written for use with the AVR architecture (e.g. Uno, Leonardo, Mega, Nano, etc.). It can't be used with ESP8266.
If compatibility is the issue then I conclude that "No such file or directory" error code is very misleading. Perhaps "Board selected is not compatible with AVR library".
#ifndef __AVR__
#error This library only supports the AVR architecture
#endif
#include <avr/io.h>
But what happens if you are compiling for a non-AVR architecture that has added an avr/io.h file for compatibility with code written for AVR? Now compilation fails unnecessarily. One example of this is Arduino SAMD Boards, which does have avr/io.h even though it's not AVR architecture. And you can't use #warning because the warning will never be shown if a file not found error is encountered. I could add a SAMD boards specific macro to the conditional but I have no way of knowing all the possible packages now or in the future that have to be "whitelisted" from this error.
There actually is a feature of the Arduino IDE that displays a warning when compiling for an architecture that is not specified by the library's library.properties file but unfortunately that warning is not displayed after a file not found error. I have reported this issue here: