I have ordered three flow sensors of type SLF3S-0600F which I want to use to monitor the flow inside a microfluidic channel, and I am not sure if it is possible to change their I2C addresses through software. The data sheet talks about a soft reset command (page 12) which is described in the I2C-bus specification and user manual (page 17) but I don't know if with this command I can actually can change the address or not.
Can someone please have a look at my code and tell me if it makes sense
#include <Wire.h> // Arduino library for I2C
void setup() {
Serial.begin(9600); // initialize serial communication
Wire.begin(); // join i2c bus (address optional for master)
Wire.beginTransmission( 0x00); // General call
Wire.write( 0x06); // Soft reset
Wire.write( 0x30); // new I2C address
Wire.endTransmission();
delay(50); // wait long enough for chip reset to complete
}
Some sensors can change their I2C address, but this sensor does not mention that.
I was already shivering and sweating, because that is often hard to do, but I can relax now, the sensor can not change its I2C address.
A "general call" is mentioned in the I2C standard. It is not often used. This sensor uses the "general call" for a soft-reset. I guess that is allowed, but I don't know if that is a good thing or a bad thing.