2020-08-31 04:34 AM
Can you suggest me what i need to add in my code to print integer value.
Thank you
2020-08-31 05:43 AM
Use sprintf() to create a string, write the string to the frame buffer bitmap using a font table.
2020-09-01 08:43 PM
int i=25;
char buffer[10];
SSD1306_GotoXY(0,0);
sprintf(buffer, "%s\n", i);
SSD1306_Puts("buffer", &Font_11x18, 1);
HAL_Delay(1000);
should i need to modify my code as written above. If anything i need to add means can you suggest me.
Thank you
2020-09-01 08:54 PM
or else do i need to add any libraries to print integer values on SSD1306 OLED display
2020-09-01 09:11 PM
buffer not in quotes
2020-09-01 09:53 PM
thank you
2020-09-01 10:11 PM
even if i remove the quotes from buffer still i am not able to print integer values on OLED display. what is the problem with my code.
2020-09-04 12:25 AM
Hi,
I think you should do an update screen, after "SSD1306_Puts...".
I mean something like this:
ssd1306_WriteString("Hello!", Font_11x18, White);
ssd1306_UpdateScreen();
I use the library of Olivier Van den Eede, modified by Le Tan ****
2020-09-04 04:26 AM
can i overwrite my integer values in ssd1306 oled .
what i should add in my code so every time my values should overwrite and display on oled .
thank you
2020-09-04 04:38 AM
Could you perhaps review documentation, or find other examples?
ssd1306_Fill(Black);
ssd1306_SetCursor(1, 1);
ssd1306_WriteString("test", Font_11x18, White);
ssd1306_SetCursor(1, 20);
ssd1306_WriteString("test2", Font_11x18, White);
ssd1306_UpdateScreen();
You could fill the buffer to clear the screen. Should overwrite if you print over same cursor location..