- Fri Sep 25, 2015 4:43 am
#184911
What is the proper syntax for saving the scale output in a variable?
float value;
Serial.print(scale.getGram(), 1); <—– WORKS
value = (scale.getGram(), 1) ;
Serial.println(value); <—– NO GOOD! DISPLAYS: “1.00”
value = (scale.getGram(), 2) ;
Serial.println(value); <—– NO GOOD! DISPLAYS: “2.00”
float value;
Serial.print(scale.getGram(), 1); <—– WORKS
value = (scale.getGram(), 1) ;
Serial.println(value); <—– NO GOOD! DISPLAYS: “1.00”
value = (scale.getGram(), 2) ;
Serial.println(value); <—– NO GOOD! DISPLAYS: “2.00”