How to do weigh scale zeroing (tare weight)? I'm using the sketch below for a weighing scale. The sketch prints out the load-cell voltage just fine. I can't figure out how to let the scale run a couple seconds to stabilize, then use the current voltage reading (nothing on the scale) as the "Zero" voltage. Then subtract that "Zero" voltage from future readings to get the actual voltage for any weight placed on the scale. For example, let's say the nothing on the scale voltage is 0.5 volts. Then a 10 LB weight is added and the voltage goes up to 1.5 volts. So the actual voltage increase from the weight is 1.5 minus 0.5, or 1.0 volts.

#include &lt;ads1262.h&gt;

const float VREF = 2.50;  // Internal reference

ads1262 PC_ADS1262;  // ADC object

void setup() {
  // initialize the  data ready and chip select pins:
  pinMode(ADS1262_DRDY_PIN,  INPUT);   // data ready input line
  pinMode(ADS1262_CS_PIN,    OUTPUT);  // chip enable output line
  pinMode(ADS1262_START_PIN, OUTPUT);  // start
  pinMode(ADS1262_PWDN_PIN,  OUTPUT);  // power down output
  Serial.begin(9600);

  // initialize ADS1292 slave
  PC_ADS1262.ads1262_Init();
  Serial.println("ads1262 Initialised successfully....");
}


void loop() {
  // Nothing to do unless data ready is asserted.
  if (digitalRead(ADS1262_DRDY_PIN) == HIGH) return;

  // Get a reading and convert to voltage.
  uint8_t *buffer = (uint8_t *) PC_ADS1262.ads1262_Read_Data();
  signed long reading = (uint32_t) buffer[1] &lt;&lt; 24
                  | (uint32_t) buffer[2] &lt;&lt; 16
                  | (uint32_t) buffer[3] &lt;&lt;  8
                  | (uint32_t) buffer[4] &lt;&lt;  0;
  float voltage = VREF / (1UL&lt;&lt;31) * reading;

  // Report a smoothed-out reading.
  Serial.println(voltage, 8);
}
You start out with a variable named Tare initialized to zero float Tare = 0.0; put in a conditional like if (millis() &gt; 2000 &amp; Tare == 0.0) Tare = voltage; and always report voltage - Tare. 

float Tare = 0;

void loop() {
  // Nothing to do unless data ready is asserted.
  if (digitalRead(ADS1262_DRDY_PIN) == HIGH) return;
  // Get a reading and convert to voltage.
  uint8_t *buffer = (uint8_t *) PC_ADS1262.ads1262_Read_Data();
  signed long reading = (uint32_t) buffer[1] &lt;&lt; 24
    | (uint32_t) buffer[2] &lt;&lt; 16
    | (uint32_t) buffer[3] &lt;&lt;  8
    | (uint32_t) buffer[4] &lt;&lt;  0;
  float voltage = VREF / (1UL&lt;&lt;31) * reading;
  if (millis() &gt; 2000 &amp; Tare == 0.0) Tare = voltage;
  // Report a smoothed-out reading.
  Serial.println(voltage-Tare, 8);
}


If you want to make it smarter, add a button for tare and maybe if you have a calibration weight, add a button for calibrating.

float scale= 1.0;
const float calib_weight = 500.0; // grams?  
...
if(tareButton | (millis() &gt; 2000 &amp; Tare == 0.0)) Tare = voltage;
if(calibrateButton) scale = calib_weight / (voltage-Tare) ; 
...
Serial.println((voltage - Tare)*scale,8); 
...