SunFounder Euler Kit for Raspberry Pi Pico
latest
  • Introduction to Raspberry Pi Pico
  • What is Included in This Kit
  • Electronic Circuit
  • For MicroPython User
  • Play Pico with APP
  • For Arduino User
  • For Piper Make
    • 1.1 Set up the Pico
    • 1.2 Quick Guide on Piper Make
    • 1.3 How to Save or Import Code?
    • 2.1 Blink LED
    • 2.2 Button
    • 2.3 Service Bell
    • 2.4 Rainbow Light
    • 2.5 Drum Kit
    • 2.6 Smart Water Tank
    • 2.7 Swing Servo
    • 2.8 Light Intensity Display
    • 2.9 Lucky Cat
    • 2.10 Flowing LEDs
    • 2.11 Reversing System
    • 2.12 Smart Fan
    • 2.13 Reaction Game
  • FAQ
SunFounder Euler Kit for Raspberry Pi Pico
  • Docs »
  • For Piper Make »
  • 2.1 Blink LED
  • Edit on GitHub

2.1 Blink LEDΒΆ

For this project, we intend to make the extended LED light blink. To use extended electronic components, a solderless breadboard will be the most powerful partner for novice users.

The breadboard is a rectangular plastic plate with a bunch of small holes in it. These holes allow us to easily insert electronic components and build electronic circuits. The breadboard does not permanently fix the electronic components, which makes it easy for us to repair the circuit and start over when we make a mistake.

  • Breadboard

  • LED

  • Resistor

Wiring

wiring_led

  • The color ring of the 220 ohm resistor is red, red, black, black and brown.

  • The longer lead of the LED is known as the anode (+), the shorter lead is the cathode (-).

Code

Note

  • You can refer to the image below to write code by dragging and dropping.

  • Import 2.1_blink_led.png from the path of euler-kit\piper. For detailed tutorials, please refer to Import the Code.

blink1

After connecting Pico, click the Start button and you will see the LED blinking. For more details, you can refer to 1.2 Quick Guide on Piper Make.

How it Works?

This is the body of the loop: turn the pin15 on to light up the LED, wait one second, then turn the pin15 off to make the LED go off. Wait 1 second and then re-run the previous cycle, so you can see the LED has been in the state of alternating between light and off.

  • [start]: This block is the basic framework of the program and represents the beginning of the program.

  • [repeat forever do() wait()seconds]: Means that the blocks in it will be executed repeatedly, and the execution time interval is defined by yourself.

  • [turn pin () ON/OFF]: Indicates that a certain pin is placed in a high level (ON) or a low level (OFF).

  • [wait () seconds]: Set the execution interval between blocks.

Next Previous

© Copyright 2023, SunFounder Revision 31d75340.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: latest
Versions
latest
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.