I've recently got my hands on a Uno R4 Wifi, having had many years of experience on Unos, Nanos, Megas etc.
It all works fine, but then I came to use some of the sketches that I had previously used on an R3.
For example a sketch that uses #include <Adafruit_SSD1306.h> for use with a small OLED display.
When I try to compile it for the R4, I get errors to do with the wire library - and it was trying to use the wire library for my old R3, and ignoring the one for the R4.
So I copied the R4 wire to be in my sketch folder, which got me past that, but then a different library, another AVR based one is missing.
So, it appears to me that the IDE is failing to look for the R4 stuff, as I know the AVR based stuff won't work.
And here's the kicker... if i use EXCATLY the same sketch in the on-line editor, not the 2.3.0 IDE - it works perfectly!
What am I doing wrong? I have tried this on two PCs, just the same, why won't it use the correct libraries?
TIA
Paul
Your topic had=s been moved to the Uno R4 WiFi category of the forum
Exactly which board have you got selected in the IDE ? If you turn on verbose reporting for compilation you can see which libraries are being selected by the compiler
Note that there are problems with some libraries for the R4 boards
Have you manually installed another Wire library in your library directory tree at some time in the past? Core specific libraries, like Wire, and SPI, are automatically installed in each core directory and the appropriate one should be correctly picked up by the compilation process as long as you don't have other(s) manually installed in the library directory tree.
thanks for the reply - I have definitely selected the correct board, and I've done all sorts of messing about removing the R4 board and reinstalling, I am quite experienced
I have seen the compatibility link you mention, but it's not really that that is the issue, it's that the IDE looks for AVR stuff all the time, not the R4 stuff - and as I said, it works in the on-line environment
thanks for your reply
I have not knowingly installed them... though for example wire is in my Library folder, should it not be? I am somewhat confused by the libraries system in general!
Wire should definitely not be in your library tree.
If you turn on verbose output for your compilation, I imagine you'll see that it's seeing both that library and the one in the renasas_uno/1.0.5/libraries directory, but choosing your manually installed one in sketchbook/libraries.
okay... well I don't know where it came from
so I've removed it - and it works!
genius - thanks so much
much appreciated