Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 10 months ago.
Please write example:how to print variable and text.
Please write example: how to print variable and text.
Question relating to:
1 Answer
8 years, 10 months ago.
Hi Dimitry I will add doxygen comments to the SGL.h about how to print variable and text. I will try to add it tonight.
Best regards
Juergen
Sorry, didn't have time to update the code. Here is an example:
Draw text example
char* str = "QTOUCH"; oled.setFont((FontType)(simpleFont), 8, 8, 32, 127); // Proper C++ cast of pointer to pointer is not allowed oled.drawString(str, 5, 5, Green, 1, 6); oled.drawString(str, 5, 20, Green, 1.5, 6); // TODO: There is a bug in rendering with this value oled.drawString(str, 5, 40, Green, 2, 6); wait(2); oled.setScrolling(SD_Horizontal, 0, 64, SI_10_Frames);