Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const char *srcString = "Microcontrollers are lots of fun!";
- size_t strLen = strlen(srcString);
- size_t buffSize = LCD_WIDTH + strLen;
- char* screenBuffer = malloc(buffSize);
- memset(screenBuffer, ' ', LCD_WIDTH - 1);
- memcpy(&(screenBuffer[LCD_WIDTH - 1]), srcString, strLen + 1);
- size_t i = 0;
- while (true) {
- lprintf("%.*s\n", LCD_WIDTH, &(screenBuffer[i %= buffSize]));
- //wait_ms(300);
- i++;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement