Coding the Circuit Playground Express

MakeCode for the Adafruit Circuit Playground Express is a great environment both for novice coders and for those wishing to further advance their understanding. The Simulator on the left can show you how your code will perform in many scenarios, and loading your code on the device gives quick and satisfying confirmation. For those who are already comfortable with coding, there are many blocks to challenge your skills, and toggling between the blocks environment and the JavaScript they represent can add more challenges and extended learning. See below for more on bridging from MakeCode blocks to JavaScript.

This chapter will first discuss and give practice exercises for the Toolbox drawers of ||input:INPUT||, ||light:LIGHT|| and ||music:MUSIC||. We will then work with ||loops:LOOPS|| and ||logic:LOGIC||. Finally, we will use ||variables:VARIABLES|| and ||network:NETWORK||. Reading about and practicing with these blocks and concepts will not only set you up to code all of the maker projects that follow, but it will also help you establish a foundation of coding principles that you can continue to build on. If you are new to coding, don’t worry if some aspects aren’t clear to you right away. Read, practice, then cycle back to the text. You will find that things become clearer the more you work with them.

MakeCode Environment

Coding with blocks

Input, Light, and Music



Variables and network