You can modify this code to suit your needs, of course. For example, instead of calling Update() periodically, you can read channels only when you need them:
int offset_a = 0;
int offset_b = 0;
int ReadA()
{
while (current_ch) Update(); // make sure channel A has been read
return value_a - offset_a;
}
int ReadB()
{
while (!current_ch) Update(); // make sure channel B has been read
return value_b - offset_b;
}
// call this in the beginning of a program when sensors are in neutral position
void Tare()
{
// reset previous offsets
offset_a = 0;
offset_b = 0;
// read and discard to initialize chip gain
ReadB();
// store current values as new offsets
offset_a = ReadA();
offset_b = ReadB();
}