🔌 In/Out – Your Digital “Senses and Limbs”

What it is: The blocks that allow the robot to receive information (input) and give commands (output).

What it does: Connects the physical world with your code.

Example: A button that sends a signal (input) and an LED that lights up (output).

👉 Think of this as the robot’s eyes and hands.

🧩 Fun Guide to In/Out Blocks (Clu-blocks Pro)

⚠️ Important! Always use the setup blocks first before trying to read or write to a pin. If you skip setup, your robot won’t know what to do — and nothing will work!

# Block What it does Dropdown options What the options mean
1 HIGH Sets a digital signal to ON HIGH, LOW HIGH = ON (power), LOW = OFF (no power)
2 setup pin# as Digital Output pin# 2 Prepares pin 2 to send signals Digital Output, Digital Input, PULLUP, pull down input Digital Output: send signals (e.g. turn on LED)
Digital Input: receive signals (e.g. read button)
PULLUP / pull down: stabilize button readings
3 Digital Output pin# 2 Stat HIGH Sends a signal to pin 2 (e.g. turn on LED) HIGH, LOW Choose if the pin should be ON (HIGH) or OFF (LOW)
4 get Digital Input pin# 2 value Reads if pin 2 is ON or OFF Useful for checking if a button is pressed
5 Analog Input pinAO Ref VoltageStat 3.3V Sets the voltage reference for analog readings 3.3V, 2.2V, 1.5V, 1.2V Choose the base voltage for better sensor accuracy
6 Analog Input pinAO Ref ResolutionStat 3.3V Sets the resolution for analog readings 3.3V, 2.2V, 1.5V, 1.2V Controls how detailed the sensor reading is
7 get Analog Input pinAO value Reads the analog value from pin A0 Great for sensors like light, temperature, or sliders
8 setup PWMAnalog pin# as PWMAnalog Output pin# 2 Prepares pin 2 to send PWM signals Needed for controlling brightness or motor speed
9 PWMAnalog Output pin# 2 frequencyStat 2000 Sets the speed of PWM pulses on pin 2 Number (e.g. 2000 Hz) Controls how fast the signal pulses — affects smoothness
10 get Touch Sensor pin# AO value Checks if the touch sensor on pin A0 is touched Great for invisible buttons or touch-sensitive controls
11 attachInterrupt pin# 2 mode RISING do attachInterrupt_func Sets up a reaction when pin 2 changes RISING, FALLING, CHANGE RISING: when signal goes from OFF to ON
FALLING: when signal goes from ON to OFF
CHANGE: any change
12 pass Does nothing (placeholder block) Used when you want to leave a function empty for now
13 setup dac# as DACAnalog Output dac# 2 Prepares DAC pin 2 to send smooth analog signals Number (2, 3) Needed for real analog output (not just ON/OFF)
14 DACAnalog Output dac# 2 value 2 Sends a smooth analog value to DAC pin 2 Number (2, 3) Controls intensity or level (e.g. soft light, quiet sound)

🧠 Quick Tips for Students

  • Setup first, always! If you don’t tell the robot what the pin is for, it won’t work.
  • Dropdowns are your friends. They let you change how the block behaves — just click and choose.
  • Digital = ON/OFF, Analog = smooth values, PWM = fast pulses, Interrupts = instant reactions.

Let me know when you’re ready to send the next image — and I’ll build the same kind of guide for that category!

On this page