Go on. It is a simple question of putting the right statements in setup() and in loop()
void setup()
{
Serial.begin(9600);
//-----------------------------------
scale.set_scale();
scale.tare(); //Reset the scale to 0
long zero_factor = scale.read_average();
//---------------------------------
tft.reset();
uint16_t identifier = tft.readID();
tft.begin(identifier);
Serial.print(identifier);
tft.setRotation(1);
tft.fillScreen(WHITE);
tft.setTextSize(4);
tft.setTextColor(BLACK, WHITE); //set back colour for rubout
}
void loop()
{
Serial.println(scale.get_units());
tft.setCursor(130, 100);
tft.print(scale.get_units());
tft.print(" "); //rubs out old digit
delay(1000); //wait between readings
}
You seem to get different readings. It is often wise to take three or four readings and display the average.
David.