Argon's datasheet and the online documentation indicate that there are two sets of I2C pins:
- D0 and D1 are SDA and SCL
- D2 and D3 are SDA1 and SCL1
The wire library does not seem to have a way to specify which set to use. For a separate Arduino ESP32 project I'm using the Adafruit_AHTX0 library (for AHT21 temperature / humidity sensor). The Arduino wire library has a TwoWire class with this function override:
void begin(int sda, int scl);
so you can specify the SDA and SCL pins.
I tried to use the same library with my Argon project and it uses the spark_wiring_i2c library, which I believe is embedded in the firmware. I looked at the source code and don't see a way to specify the pins for SDA and SCL. Is there some way to do this?
Why do I want to know? Because my Argon system is already running inside a crowded septic panel control box and am using D0 for something else. Rerouting the wiring was annoying but I was able to rewired things so I can use D0 and D1. And the sensor worked flawlessly the first time (that never happens!) but now I'm curious whether there is a way to use D2 and D3.
Background: My original (outdoor) septic control panel was badly corroded from moisture and H2S. When the septic pump wore out, the septic tank overflowed because the corroded control panel malfunctioned and didn't sound the alarm. So my new control panel has an Argon inside monitoring for clogged filter, high liquid level alarm, panel temperature and humidity, and pump current (too high or low means pump is fubar). I'm using webhooks to send warning alerts to my phone and Alexa so no more surprises.
Anyway, thanks in advance for any advice you can give me.