I pushed another update. Now you should be able to use several boards at once.
Try the following:
- you need to add a 10k pull-up resistor from the SCL line to 3.3V and from the SCK line to 3.3V (you only need to do this once, not on each board). If you are using a Trill Hub, this is not necessary.
- you should set each board to a different address creating solder bridges on the provided pads. After changing the address, run i2cdetect -y -r 1
in the console at the bottom of the IDE to verify the new address (those values are hexadecimals)
- set the addresses of all the connected devices in:
std::vector<uint8_t> i2cAddresses = {
0x21,
0x22,
0x26,
0x27,
};
It's OK if you have more addresses here than the connected devices: only the connected ones will be used (you will get a warning message for each of the ones that are not connected).