0% found this document useful (0 votes)
297 views4 pages

Block Programming With Raspberry Pi Pico: Step 1: BOM

This document provides instructions for programming a traffic light simulation using block-based coding with the Raspberry Pi Pico microcontroller. It describes connecting LEDs to three digital pins on the Pico along with resistors to represent red, yellow, and green lights. The code is created and edited online using the Playpiper block editor, with blocks to turn pins on and off in a repeating loop to simulate the traffic light changing. The code is then modified to have the red and yellow lights turn on together when transitioning from red to green to mimic real traffic lights.

Uploaded by

Khairul Anuar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
297 views4 pages

Block Programming With Raspberry Pi Pico: Step 1: BOM

This document provides instructions for programming a traffic light simulation using block-based coding with the Raspberry Pi Pico microcontroller. It describes connecting LEDs to three digital pins on the Pico along with resistors to represent red, yellow, and green lights. The code is created and edited online using the Playpiper block editor, with blocks to turn pins on and off in a repeating loop to simulate the traffic light changing. The code is then modified to have the red and yellow lights turn on together when transitioning from red to green to mimic real traffic lights.

Uploaded by

Khairul Anuar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

instructables

Block Programming With Raspberry Pi Pico

by Michal Choma

I nd out, how to program very fast and simple Raspberry Pi Pico. For programming exist block online editor, which o er
simple coding using blocks of code. For Pico I nd maker.playpiper.com, which is free. In this tutorial, I will show you how
to program simple tra c light with playpiper online editor.

http://www.youtube.com/video/838Qh3aewsY

Step 1: BOM

For tra c light projetc you will need:


1x Raspberry Pi Pico with USB cabel
3x 330 ohm resistor
1x red, 1x yellow and 1x green LED (5mm)
1x dupont cables, breadboard

Step 2: Wiring

Circuit is simple, just connect digital pins with leds. Don´t forget on resistor, otherwise you can damage.
Connect longer legs of each led to digital pins (13,14,15).
Then connect to short legs of leds resistors, 330 ohms is ok. Then connect all resistors to G (Ground pin).

Block Programming With Raspberry Pi Pico: Page 1


Step 3: Code

For programming on playpiper you will need chroome or edge. Firefox don´t work.
Open editor and click new project and create program from block.
1. at beginning you will add start block, which is necessary at every program.
2. add from loops - repeat forever violet block
3. from chip - turn pin green block
4. from chip - wait seconds green block
5. set all pins as in picture, set wait blocks as

Block Programming With Raspberry Pi Pico: Page 2


Block Programming With Raspberry Pi Pico: Page 3
Step 4: Modife Code

Classic tra c light works a little di erent. When tra c light change from red to green, red and yellow light together. You
can check it in real.

Block Programming With Raspberry Pi Pico: Page 4

You might also like