Hero image

Coundown Timer

What the code does

This demo shows how to implement a simple countdown timer. The timer starts at 10 and counts down to 0, with the number shown on the screen updating each second. The color of the text updates randomly each time the number changes. It uses the inbuilt functionality of PTB to present a stimulus for multiple frames at a time (as in Wait Frames Demo).

Visualisation

The code

Instagram image Instagram image Instagram image Instagram image Instagram image Instagram image