Hello,
I am new to stm32 cubex, i need to display integer values on SSD1306 OLED Display using STM32F103 controller but i am not able to print integer values on my OLED display.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-31 4:34 AM
Can you suggest me what i need to add in my code to print integer value.
Thank you
- Labels:
-
STM32F1 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-31 5:43 AM
Use sprintf() to create a string, write the string to the frame buffer bitmap using a font table.​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-01 8: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-01 8:54 PM
or else do i need to add any libraries to print integer values on SSD1306 OLED display
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-01 9:11 PM
buffer not in quotes​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-01 9:53 PM
thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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 ****
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-04 4: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-04 4: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..
Up vote any posts that you find helpful, it shows what's working..
