Hi all, I have just upgraded to a Nano R4 as they are just as capable as the original Nano (i.e. not an every). When I tried to compile (not upload) the code for a Pimeroni BMP280 the IDE gave an error with the Nano R4 selected but I switched back to a Nano and it worked fine. Any ideas?
This is where the zip is from: GitHub - orgua/iLib: Library for various I2C-Sensors with examples for Arduino
and this is the error:
In file included from C:\Users\ezzjt2\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.5.1\cores\arduino/api/Interrupts.h:27:0,
from C:\Users\ezzjt2\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.5.1\cores\arduino/api/ArduinoAPI.h:29,
from C:\Users\ezzjt2\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.5.1\cores\arduino/Arduino.h:4,
from C:\Users\\AppData\Local\arduino\sketches\A14A06EDF009F3CB1717620A2CA88034\sketch\i2c_BMP280.ino.cpp:1:
C:\Users\\Documents\Arduino\libraries\I2C-Sensor-Lib_iLib\src/i2c.h: In constructor 'WirePlus::WirePlus()':
C:\Users\\Documents\Arduino\libraries\I2C-Sensor-Lib_iLib\src/i2c.h:70:12: error: 'PORTC' was not declared in this scope
bitSet(PORTC, 4); // deactivate internal pull-ups for twi
^
C:\Users\\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.5.1\cores\arduino/api/Common.h:86:30: note: in definition of macro 'bitSet'
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
^~~~~
C:\Users\\Documents\Arduino\libraries\I2C-Sensor-Lib_iLib\src/i2c.h:70:12: note: suggested alternative: 'R_RTC'
bitSet(PORTC, 4); // deactivate internal pull-ups for twi
^
C:\Users\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.5.1\cores\arduino/api/Common.h:86:30: note: in definition of macro 'bitSet'
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
^~~~~
In file included from C:\Users\\AppData\Local\Temp.arduinoIDE-unsaved2025913-23520-xlljg6.4e2s\i2c_BMP280\i2c_BMP280.ino:2:0:
C:\Users\\Documents\Arduino\libraries\I2C-Sensor-Lib_iLib\src/i2c.h:73:5: error: 'TWBR' was not declared in this scope
TWBR = ((F_CPU / 400000L) - 16) / 2; // see twi_init in Wire/utility/twi.c
^~~~
exit status 1
Compilation error: exit status 1
