Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void scrollMessage( char *str )
- {
- char msg[] = "1234";
- const uint8_t digits = 4;
- int8_t pos = 0;
- pos -= digits;
- for ( uint8_t i = 0 ; i < digits - 1 ; i++ )
- {
- if ( (pos + i) < 0 )
- {
- disp.dig[i] = 11; // Leerzeichen
- }
- else if ( pos + i > strlen(msg) - 1 )
- {
- disp.dig[i] = 11; // Leerzeichen
- }
- else
- {
- disp.dig[i] = msg[ pos + i ];
- }
- _delay_ms(500);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement