Block Editor
The block editor lets you program a board by snapping blocks together, in the style of Kodular and Scratch. Circzy converts your blocks into Arduino C++ code automatically, so every block program is also a real Arduino sketch.
Creating a block project
On the home page, click Start Simulation on a board card and choose Blocks. The Blocks tab opens with the toolbox on the left and an empty workspace on the right.
The toolbox
The toolbox has three groups. Click a category to open its flyout, then drag a block into the workspace.
| Group | Categories | Reference |
|---|---|---|
| Built-in | Control, Logic, Math, Variables | Built-in Blocks |
| Your board (for example Arduino Uno) | Digital Pins, Analog, Sound, Servo, Serial, LCD, 7-Segment | Board Blocks |
| Components | Keypad & Remote, Sensors, Relay & Motor, Bluetooth & GPS, RFID & SD Card, LCD I2C, OLED, Number Display, NeoPixel | Component Blocks |
Blocks are colored by their role, as in Kodular: events are gold, control blocks amber, logic green, math blue, values that read something teal, blocks that set something dark green, and actions purple.
Program structure
Every program is built from two event blocks:
| Block | Runs | Equivalent code |
|---|---|---|
| when board starts | Once, when the board powers up or resets | void setup() |
| when board loops | Again and again, forever | void loop() |
Put one-time setup (for example configuring a module or printing a welcome message) in starts, and the main behavior in loops. Only one block of each kind is allowed; a duplicate is disabled and marked with a warning.
Blocks that are not attached to an event block are disabled and ignored when the code is generated.
Working with blocks
| Action | How |
|---|---|
| Add a block | Drag it from the toolbox flyout. |
| Connect blocks | Drop a block so its notch clicks under another block, or into an input slot. |
| Change a value | Click a number or text field and type, or pick from a dropdown. |
| Move a stack | Drag the top block; everything below it moves too. |
| Delete | Drag the block onto the trash can, or select it and press Delete. |
| Copy | Ctrl + C / Ctrl + V, or right-click › Duplicate. |
| Undo | Ctrl + Z. |
| Zoom | The + and − buttons on the workspace. |
| Scroll | Use the mouse wheel or drag an empty area of the workspace. |
| Center | The target button above the zoom buttons. |
Pins in blocks
Pin dropdowns only list the pins that make sense for the block on the current board:
- Digital blocks list the board's digital pins.
- set brightness of pin ~ lists only PWM-capable pins.
- read analog lists the analog inputs.
Blocks for components that need several pins (keypad, LCD, 7-segment, LED matrix, RFID, SD card) use default pins for each board. Every board page has a Default pins used by blocks table, and the generated sketch.ino shows the pins too.
Seeing the generated code
Open the sketch.ino tab to see the code produced from your blocks. It updates as you edit and is read-only in a Blocks project. It is a good way to learn Arduino C++: build something with blocks, then read how it looks in code.
Converting to a sketch
When you outgrow blocks, click Convert to Sketch above the workspace and confirm. The project becomes a Sketch project that keeps the generated code, and you can edit it freely.
Ready to try it?
Sign in with Google, pick a board and run your first simulation in two minutes. Free during the launch period.
Start simulating free