PictoBlox LED Arduino Lesson
Loading...
Control an LED with PictoBlox
CONTROL LAB
PICTOBLOX + ARDUINO UNO
01 / 18

FROM BLOCKS TO REAL-WORLD HARDWARE

LET'S MAKE
LIGHT!

Control a real LED using PictoBlox + Arduino Uno

“

Today, you're not just learning code... You're going to control something in the real world!

WHEN FLAG CLICKED
UNO
READY TO BUILD

01 / TODAY'S MISSION

YOUR MISSION

By the end of this practical, you will be able to:

  • ✓Connect an LED to Arduino
  • ✓Connect Arduino to PictoBlox
  • ✓Use a digital output
  • ✓Write your first hardware block program
  • ✓Turn a real LED ON

BIG CHALLENGE

CAN YOU MAKE
THE LED LIGHT UP?

02 / THE BIG IDEA

WHAT IS PICTOBLOX?

PictoBlox is a block-based programming environment that lets us control hardware using visual programming blocks.

PictoBloxBUILD THE COMMAND
Arduino UnoRECEIVE THE COMMAND
LEDDOES THE ACTION

We don't need to type complicated code yet. We can build our instructions using blocks.

03 / GET READY

OUR TOOLS

Everything we need for our first hardware mission.

Arduino Uno

The brain

LED

Our light

220Ω Resistor

Protects the LED

Breadboard

Helps us build

Jumper wires

Connect everything

Computer

Runs PictoBlox

04 / KNOW YOUR COMPONENT

KNOW YOUR LED

An LED has two legs. Their lengths help us connect it the right way.

LONG LEG = POSITIVE (+)

Connects toward Arduino Pin 8

SHORT LEG = NEGATIVE (−)

Connects through a resistor to GND

LONG LEG
SHORT LEG

05 / PROTECT THE LIGHT

WHY THE RESISTOR?

Arduino
LED
Resistor220Ω
GND
GND
!
WITHOUT THE RESISTOR

The LED can receive too much current.

✓
WITH THE RESISTOR

The LED is protected.

06 / BUILD THE CIRCUIT

CONNECT THE LED

Follow the path: output pin to light, light to protection, protection to ground.

01Long leg → Arduino Pin 8
02Short leg → 220Ω resistor
03Resistor → GND
PIN 8
GND
UNO

07 / GO ONLINE

LET'S CONNECT!

1

Connect Arduino Uno to the computer.

2

Open PictoBlox.

3

Select: Arduino Uno

4

Select the correct serial port. Example: COM12

5

Click: Connect

Device connection
Arduino Uno⌄
COM12⌄
CONNECTED!
UNO

08 / SPEAK ARDUINO

MEET THE DIGITAL PIN

Arduino has pins that can be controlled by our program. For this project, we use Pin 8.

8
↓
HIGHsend power
↓
ON
8
↓
LOWstop power
↓
OFF

09 / WRITE THE FIRST COMMAND

OUR FIRST BLOCK

This tells Arduino: “Send HIGH to Pin 8.”

WHEN GREEN FLAG CLICKED
SET DIGITAL PIN 8 TO HIGH
UNO
PIN 8 → LED → ON

10 / YOUR TURN

NOW YOU TRY!

PictoBlox workspace●
BUILD YOUR BLOCK STACK HERE+
LOOK→FIND→DRAG→CONNECT→RUN

Can you find the block that controls a digital pin?

11 / THE BIG MOMENT

RUN YOUR PROGRAM!

●
GREEN FLAG
UNO
ARDUINO UNO
8
PIN 8
LED LIGHTS UP!

DID YOUR LED TURN ON?

✓YES

You just controlled hardware!

⌁NO?

Check your wiring and COM port.

12 / SWITCH IT

NOW LET'S TURN IT OFF

Change one word in the block: HIGH becomes LOW.

WHEN GREEN FLAG CLICKED
SET DIGITAL PIN 8 TO LOW
HIGH = ON→LOW = OFF
LED → OFF

13 / CHALLENGE MODE

YOUR FIRST CHALLENGE

Can you make the LED follow this rhythm?

ON for 2 seconds
↓
OFF for 2 seconds
↓
↻REPEAT
✦
VISUAL HINT

HIGH → WAIT → LOW → WAIT

14 / SOLUTION REVEAL

YOUR FIRST AUTOMATIC LIGHT

FOREVER
SET PIN 8 → HIGH
WAIT 2 SECONDS
SET PIN 8 → LOW
WAIT 2 SECONDS
↻

15 / QUICK RECAP

THINK LIKE A PROGRAMMER

01

What does HIGH mean?

ON
02

What does LOW mean?

OFF
03

Which pin did we use?

PIN 8
04

What does the resistor do?

PROTECTS THE LED
05

What does PictoBlox do?

PROGRAMS ARDUINO USING BLOCKS

16 / KEEP EXPLORING

WHAT CAN WE BUILD NEXT?

Traffic light
Smart doorbell
Security alarm
Distance sensor
Automatic night light
Robot

This tiny LED is your first step into robotics.

MISSION COMPLETE

YOU DID IT!

PictoBlox
→
Arduino Uno
→
LED

BLOCKS → CODE → CIRCUIT → REAL WORLD

You didn't just make an LED light up.
You gave a computer the power to control the physical world.

NEXT MISSIONBUILD A TRAFFIC LIGHT!