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:

Driver for the Seeedstudio RGB OLED module for the xadow M0

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

Accepted Answer

No any information yet.

posted by Dmitry Dzhafarkhanov 14 Jan 2016

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);
posted by Juergen M 14 Jan 2016