I am now trying to compile the i2c_address_detect example in the Adafruit BusIO folder. I have made no changes to it. I have selected the Adafruit Metro board to compile against. All my boards and my libraries are up to date. I am running the "older" IDE, version 1.8.19 under Windows 11. (I just like the older IDE better.)
When I try to compile the program, I get the following error message:
Code: Select all
C:\Users\rick\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_I2CDevice.cpp: In member function 'void Adafruit_I2CDevice::setPins(uint8_t, uint8_t)':
C:\Users\rick\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_I2CDevice.cpp:41:10: error: 'class TwoWire' has no member named 'setSDA'
_wire->setSDA(sda);
^~~~~~
C:\Users\rick\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_I2CDevice.cpp:42:10: error: 'class TwoWire' has no member named 'setSCL'
_wire->setSCL(scl);
^~~~~~
Multiple libraries were found for "Wire.h"
Used: C:\Users\rick\AppData\Local\Arduino15\packages\adafruit\hardware\avr\1.4.15\libraries\Wire
Not used: C:\Users\rick\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire
I also will say that when I try examples from the Wire folder, such as digital_potentiometer, they compile without an issue.
Does anyone know what might be causing this?
Thanks!
PS: In case anyone wants to see the code from the example:
Code: Select all
#include <Adafruit_I2CDevice.h>
Adafruit_I2CDevice i2c_dev = Adafruit_I2CDevice(0x10);
void setup() {
while (!Serial) { delay(10); }
Serial.begin(115200);
Serial.println("I2C address detection test");
if (!i2c_dev.begin()) {
Serial.print("Did not find device at 0x");
Serial.println(i2c_dev.address(), HEX);
while (1);
}
Serial.print("Device found on address 0x");
Serial.println(i2c_dev.address(), HEX);
}
void loop() {
}