Changing address of the AS1115

Based on the AS1115 class it appears the hex address can be changed, however, I’m not having any luck getting two displays working independently. Is my assumption correct, or am I not able to change the address via software?

From the header file:
SELF_ADDRESSING = 0x2D, ///< Uses 2 of the 16 keys to change the device’s address.

And the init code from the cpp file:

void AS1115::init(uint8_t digits, uint8_t intensity)
{
_digits = digits;

Wire.beginTransmission(0x00);
Wire.write(SHUTDOWN);
Wire.write(NORMAL_OPERATION | RESET_FEATURE);
Wire.endTransmission();

**if(_deviceAddr != 0x00) {**

** Wire.beginTransmission(0x00);**
** Wire.write(SELF_ADDRESSING);**
** Wire.write(1);**
** Wire.endTransmission();**
** }**

writeRegister(DECODE_MODE, 0x00);
writeRegister(SCAN_LIMIT, digits - 1);
setIntensity(intensity);

}

this is a bit difficult to use IC. i tried to change address a while back but never got it working. MUX is way to go in this case.

Yea, no luck for me either. I had to use the mux, but now it’s working. I have multiple thermocouples, each thermocouple has its own AS1115 display, and it’s all working as expected.

I can start a new thread and post the code if that’s something that would be helpful.

1 Like