Let's start! Step by step

Blink, blink!

Let's get down to business!

Before doing anything, you need to connect your CircuitPet to your computer's USB port and turn it on.

random image

Let's play with the LED!

The first thing we'll learn is how to code CircuitPet's LED to blink in different colors!

The first block that we need to find says "loop forever". This particular block ensures your code is executed all the time.

You can find the block in the "Loops" block section. 

Drag and drop it onto the drawing area. 


Look for the "LED set color" block in the I/O block section

Because the LED will light up first in red, set the value of red to 255 (the maximum) and the values of the other colors to 0. 



Between red and the other color that will light up, we'll make a pause of 1 second. 



Duplicate the I/O block and place it underneath the time block.

Because the LED will light up green this time, set the value of red to 0 and the value of green to 255.



Don't forget the time block. 



Repeat the process once again, this time for blue. 



Now, hit the big red "Run" button and watch the LED change its color.