EduBlocks is a "block-based" programming language. This means instead of writing lines of code to program, we use "blocks". Each block has a specific category that describes what its purpose is. In EduBlocks, each block type corresponds to a library in CircuitPython.
Each CircuitPython program you run needs to have a lot of information to work. The reason CircuitPython is so simple to use is that most of that information is stored in other files and works in the background. These files are called libraries.
For example the NeoPixel library allows us to control the NeoPixels on the board. Without importing the library, we cannot access the functionality.
- Basic blocks are core functionality of CircuitPython. With these blocks, we can create loops, conditional statements, functions, and more.
- This section allows you to create variables. To create a variable, you simply click the Create Variable.. button, give the variable a name and then two blocks will appear which will allow you to use the variable in your code
- This library lets us manage digital inputs and outputs. For example this library lets us access the buttons on the CPX and use them to trigger outputs like changing the colors of NeoPixels. Read more about the library here.
- This library allows us to control the properties of NeoPixels LEDs such as brightness, color and more. Read more here.
- With touch blocks, we can access the capacitive touch capabilities of different inputs. On the CPX there are multiple capacitive touch inputs we can use to trigger different events, for example, playing a sound. It's all done with our fingers! Learn more here.
- The PWM (Pulse-Width Modulation) library allows us to control components like leds and servos in a more precise way than just on or off. For example we can fade LEDs and change speed of servos. More here.
- Control brightness, color and other attributes of another type of led. Dotstars are great for light painting! More here.
- By clicking "Extentions" on the top right of the interface, we can add one more library entitled "Circuit Playground Easy"
- This library allows us to perform tasks that the other libraries allow with much simpler code. These blocks are great for first timers. More here.