Board Blocks
The second group of the toolbox is named after your board (for example Arduino Uno or ESP32 DevKit V1). Its blocks control the board's own pins and its serial port. Pin dropdowns only show the pins that suit each block on the current board; the pictures below show the Arduino Uno.
What the blocks generate
| Block | Generated code |
|---|---|
| set pin … to ON/OFF | digitalWrite(pin, HIGH/LOW), with pinMode(pin, OUTPUT) in setup() |
| read digital pin … | digitalRead(pin) |
| if button on pin … is pressed | if (digitalRead(pin) == LOW), with pinMode(pin, INPUT_PULLUP) in setup() |
| read analog … | analogRead(pin) |
| set brightness of pin ~ … | analogWrite(pin, value) with a value from 0 to 255 |
| play tone … Hz on pin … | tone(pin, frequency) |
| turn servo on pin … to angle … | Servo (ESP32Servo on ESP32) attached with 544–2400 µs pulses, angle limited to 0–180 |
| print to Serial … | Serial.println(...), with Serial.begin(9600) in setup() |
| LCD … | LiquidCrystal on the board's default LCD pins |
| show digit … on 7-segment | A helper that drives the segments a–g on the board's default pins |
The default pins for the LCD and 7-segment blocks are listed in the Default pins used by blocks table of each board page.
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