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

If everything is okay, CircuitBlocks should say "CircuitPet connected".

random image

If CircuitBlocks didn't recognize your CircuitPet, please check if the USB cable is plugged in properly and if you are using a working USB port on your computer.

If you still cannot get CircuitBlocks to recognize your CircuitPet, something possibly went wrong with the driver installation on your computer. Drivers are these little programs that help your computer communicate with CircuitPet, and they sometimes act funny. Reach out to us via email at contact@circuitmess.com if you cannot get your computer to recognize your CircuitPet.  


Let's play with the LED!

The first thing we'll learn how to code is - how to make your LED blink in different colors!

The first block that we need to find says "set RGB LED color". This particular block controls whether LEDs are turned on or off.

Because LED is one of CircuitPet's output components, you can find the block you need in the I/O block section.

random image

When you click "off," you'll be presented with a color palette from which you can choose.

We went with red this time, but you can use any color you want.

random image

The beginning of your code should look like this by now: 

random image

Because we want the LED to blink, we have to set the time that will pass between the LED turns on.

For that, search for a time block that looks like this: 

random image


Once again, you can choose whatever time you want. However, we decided that the time between two LED blinks should be one second

random image

To make it more fun, we decided that each blink would be in a different color.

To do so, either repeat the steps we took for the first two blocks or simply click the right mouse button and select the duplicate option.

random image

As you can see, the second color that will shine is cyan.

Now, we have to set the amount of time that will pass between the first and the second blink. 

To do that, simply duplicate the "wait 1 seconds" block. 

random image

Let's do this once again! 

Duplicate
 both blocks (the color and the time one), and fill in the circles with yellow and 1

This is what your code should look like by now:

random image

Now, hit the big red "Run" button and watch the code compile

If this is your first time doing it, the code may take up to a minute to compile.

But don't worry; the compilation should be faster after that.

When you hit the Run button, the red line will appear beneath the Toolbar representing the percentage of code that's compiled. Once the code is compiled, your CircuitPet will restart, and the LED will start blinking in red, cyan, and yellow at one-second intervals.