- #include "TCA6424A.h"
- #include <Arduino.h>
- #define SDA 5
- #define SCL 0
- #define RESET_PIN 2
- TwoWire twi(1);
- // TCA6424A expander1(&twi);
- TCA6424A expander2(&twi);
- void setup()
- {
- Serial.begin(115200);
- twi.setPins(SDA, SCL);
- // expander1.begin(TCA6424A_ADDRESS_ADDR_LOW);
- expander2.begin(TCA6424A_ADDRESS_ADDR_HIGH);
- }
- void loop()
- {
- // Serial.print("expander1: ");
- // Serial.println(expander1.testConnection() ? "true" : "false");
- Serial.print("expander2: ");
- Serial.println(expander2.testConnection() ? "true" : "false");
- delay(1000);
- }
" expander2: [ 15][E][esp32-hal-i2c.c:142] i2cWrite(): could not acquire lock "