I think I have most of the code set up, I just need help printing the current weight on the screen. I'm stuck on a specific part that's giving me trouble. weight is the final step to printing out the weight.
Here are lines 93-99 the area giving me trouble.
//displays a status to the screen
void show_weight( String scale1_string = "" , unsigned int x0 = 5, unsigned int y0 = 350 ) {
screen.graphicsMode( );
screen.fillRoundRect( x0, y0, 387, 50, RADIUS, BLACK );
String weight_string = scale1.set_scale1(CAL_FACTOR);
write_text( x0+130 , y0+5, weight_string , P_COLOR );
}
Silo_Unloader.ino (12.6 KB)
If you call your routine, the parameters given with it are useless.
There is a little info given to help
I put the whole code for download
Are you able you print text on the screen ?
Get it working with text first
Exactly which screen are you using ?
Which library are you using ?
Does it come with any examples ?
I'm using a 7in touch using the libraries: (SPI.h, Adafruit_GFX.h, and Adafruit_RA8875.h.)
And Writing text normally I can do, I'm prob overthinking how to insert data into the text.
Writing text normally I can do
So despite what you said in reply #4 you can write text to the screen.
It looks like the library only supports writing text, but that can be worked around. What data type is your Weight variable ?