I'm recently got a weight cell and am following this tutorial:
Instead of using Uno, I'm using Leornardo board on AVR ISP
I'm also using the library suggested from the tutorial:
Everything works fine until I tried to log the scale data into a float value by
//What i want but doesn't work//
float scaleunit = (scale.get_units(), 1);
serial.print (scaleunit);
The codes only work on these circumferences:
//Works//
serial.print (scale.get_units(), 1);
&
//Works//
float scaleunit = (scale.get_units());
serial.print (scaleunit);
I wonder why would specifically (scale.get_units(), 1) doesn't work and if i still want the function from the 1 (to print the average of 5 readings from the ADC minus tare weight, divided by the SCALE parameter set with set_scale), what should I write?
Thanks so much,
Cher