Skip to content

Latest commit

 

History

History
6 lines (3 loc) · 1.13 KB

Maisie - Animations in Makecode.md

File metadata and controls

6 lines (3 loc) · 1.13 KB

Animations in Makecode

The goal of this exercise is to introduce a fundamental understanding of the capabilities of lights in the CPx specifically through the use of various animation functions. In this post, I developed various programs that illustrate different animation settings that result in different light patterns on the CPx. Using the forever loop, which we learned about in the previous chapter, I will create a program that expresses how animation and lights work in Makecode.

In this program, I start by using a forever loop, similar to the programs in the previous chapter I also use an “if” and “else if” statement. This “else if” statement says if “button A is pressed” then the lights on the CPx have the animation of a purple dot flying around in a circle for five seconds. This program states that if button B is pressed, then the lights on the CPx will have the animation of the “color wipe” for five seconds. In addition, if both buttons A and B are pressed at the same time the lights in the CPx will have the animation of the rainbow effect, where the lights on the CPx are shown as a rainbow of colors.