Simple timer
This chapter will teach us how to change the color of the display every second.
Begin by looking for the "loop forever" block in the "Loops" block section.
![](https://cdn.shopify.com/s/files/1/0552/3269/2430/files/Screenshot_2023-06-28_111412.png?v=1687947011)
To change the color of the screen, we'll need the "fill frame with..." and "push frame" blocks from the "Display" block section.
![](https://cdn.shopify.com/s/files/1/0552/3269/2430/files/Screenshot_2023-06-28_111525.png?v=1687947090)
Let's pause for 1 second and then change the color of the screen again.
For the pause, look for the time block labeled "sleep 1 seconds".
![](https://cdn.shopify.com/s/files/1/0552/3269/2430/files/Screenshot_2023-06-28_111716.png?v=1687947194)
Now, we'll change the color of the screen into red.
![](https://cdn.shopify.com/s/files/1/0552/3269/2430/files/Screenshot_2023-06-28_111755.png?v=1687947243)
You can play with as many colors you want!
![](https://cdn.shopify.com/s/files/1/0552/3269/2430/files/Screenshot_2023-06-28_111910.png?v=1687947326)
After finishing the code, click on the Run button, and check the colors changing.
Begin by looking for the "loop forever" block in the "Loops" block section.
![](https://cdn.shopify.com/s/files/1/0552/3269/2430/files/Screenshot_2023-06-28_111412.png?v=1687947011)
To change the color of the screen, we'll need the "fill frame with..." and "push frame" blocks from the "Display" block section.
![](https://cdn.shopify.com/s/files/1/0552/3269/2430/files/Screenshot_2023-06-28_111525.png?v=1687947090)
Let's pause for 1 second and then change the color of the screen again.
For the pause, look for the time block labeled "sleep 1 seconds".
![](https://cdn.shopify.com/s/files/1/0552/3269/2430/files/Screenshot_2023-06-28_111716.png?v=1687947194)
Now, we'll change the color of the screen into red.
![](https://cdn.shopify.com/s/files/1/0552/3269/2430/files/Screenshot_2023-06-28_111755.png?v=1687947243)
You can play with as many colors you want!
![](https://cdn.shopify.com/s/files/1/0552/3269/2430/files/Screenshot_2023-06-28_111910.png?v=1687947326)
After finishing the code, click on the Run button, and check the colors changing.
BackNext