Now that you've set up your hand, you can program it with Microsoft MakeCode for Adafruit!
MakeCode is a web-based code editor designed for beginners that is amazingly simple to learn. You can use it online -- there's no need to download anything. You can build programs quickly with drag-and-drop blocks, similar to Scratch.
If you're new to MakeCode and CPX, you can learn more by checking out the Adafruit MakeCode Guide.
|
Coding the Onboard NeoPixel LEDs and Music
Making the ring of LEDs right on the CPX board glow or change color is amazingly simple, and will add another element to the external lights you are going to code.
Just click on the LIGHT menu at the top of the list, choose one of the blocks, and drag it into the workspace. When you place it inside a block from the INPUT or LOOPS menu, you can make it play. There are preprogrammed animations as well as blocks that let you set the colors yourself.
Use pause
blocks from the LOOPS menu to set how long a light should be lit or dark.
The musical notes are found in the MUSIC menu, where you will also see preprogrammed sounds and a melody block that lets you create a sequence of eight notes by clicking on a grid of colored squares. Easy peasy!
The program at the top of this page makes the onboard LEDs flash orange while playing notes. You can view, edit, and run it by going to this link or clicking the button below.
Then go on to see how to program the external LEDs you have added to the CPX!