lexus2k / lcdgfx

Driver for LCD displays running on Arduino/Avr/ESP32/Linux (including Rasperry) platforms
MIT License
356 stars 51 forks source link

How to print a variable? #76

Closed raphael303 closed 2 years ago

raphael303 commented 2 years ago

Ask any question, you have, regarding the library How can I print a variable?

I tried: void loop() { display.printFixed(0, 8, "Counter", STYLE_NORMAL); display.printFixed(0, 16, counter, STYLE_NORMAL); counter = counter + 1; delay(1000); } Which display gibberish instead of the counter value. Also tried a "float" variable, which doesn't compile at all. So how do I display variables of any kind? I looked at most of the demos, but didn't find an example for this.

Thank you.

lexus2k commented 2 years ago

Use display.print(10) or display.print(2.2f). If that doesn't work for, let me know.

TurboMarian commented 1 year ago

Can we have example of this? When I use : display.print (80, 16, (OILP, 0), STYLE_BOLD); have error: no matching function for call to 'DisplaySSD1351_128x128x16_SPI::print(int, int, int, EFontStyle)'

Thank you.