Hi Steve,
FPS is calculated based on other factors; it's not something that can be explicitly set.
We can make some tweaks to 'Marquee.pde' to have it scroll at half speed though. We'll just add a second frame counter around the first. This will keep other calculations from getting messed up.
In the variable declarations near the top, add:
- Code: Select all
static uint8_t f2 = 0;
Around line 228 (or 229 after the above line is added), double the timeout period:
- Code: Select all
watch.setTimeout((sum + 8) * 4 * 2); // Sleep after time/date scrolls off left edge
And a couple lines later, initialize both f and f2:
- Code: Select all
f = f2 = 0;
Finally, near the bottom of the file, only increment the 'f' counter on every second frame:
- Code: Select all
if((++f2 & 1) == 0) {
if(++f >= 4) {
curX--;
f = 0;
}
}
(Explanation: every frame, increment f2 and check if the result is even (bit 0 is clear). If so, increment f (the normal frame counter) which controls the sub-pixel scrolling of the text. f2 is never reset to zero because we're just checking the least bit...it's perfectly okay that it 'rolls over' on its own, the result is the same.)