Skip to content
Parallax Learn

Parallax Learn

  • Welcome
  • Tutorials
        • Tutorial Series head tag

          Tutorial Series
        • Tutorial Series

          The special, classroom-ready series pages are organized collections of tutorials for our most popular hardware and/or languages. The tutorials for each topic are conveniently accessible from a single page, shown in the order it is recommended that they be completed.
        • Robotics Series Head tag

          Robotics Series
        • Robotics Series

          • Artificial Intelligence
          • Cybersecurity: Radio Data tutorialCybersecurity
          • cyber:bot + Python
          • cyber:bot + MakeCode
          • Boe-Bot Tutorial SeriesBoe-Bot
          • Arduino Shield-Bot
          • ActivityBot with C TutorialsActivityBot + C
          • ActivityBot with BlocklyProp Tutorial SeriesActivityBot + BlocklyProp
          • Scribbler 3 Tutorial SeriesScribbler 3
        • Electronics & Programming Series Head tag

          Electronics & Programming Series
          • BS2 Board of Education Tutorial SeriesBS2 Board of Education
          • Propeller C-Language BasicsPropeller C Basics
          • FLiP Try-It Kit C Tutorial SeriesFLiP Try-It Kit + C
          • FLiP Try-It Kit BlocklyProp TutorialsFLiP Try-It Kit + BlocklyProp
          • Badge WX Tutorial SeriesBadge WX
          • Propeller BlocklyProp Basics and ProjectsPropeller BlocklyProp Basics
          • View All Tutorial Series »
        • Browse Tutorials
        • Browse Tutorials

          Individual tutorials sorted by robot or kit, and language.
        • By Robot or Kit
          • ActivityBot
          • SumoBot WX
          • Boe-Bot
          • Shield-Bot
          • cyber:bot
          • Badge WX
          • ELEV-8
          • ARLO
        • By Language
        • By Language

          • Propeller C
          • Arduino
          • BlocklyProp
          • PBASIC
          • Python
          • MakeCode
          • View All Tutorials »
  • Educators
  • Reference
  • Downloads
  • Home
  • All Courses
  • LED Lights

LED Lights

Connect and Blink a Light

In this activity, you will connect the LED circuit to a micro:bit I/O pin and use a script to turn the light on and off.  You will also use the script to adjust the on/off rate and number of times it blinks.  Last, but not least, you will calculate the timing of the lights.  The three most common ways to quantify timing are called period, frequency, and duty cycle.  

Parts

Let’s begin by re-using the familiar LED circuit, first built in the Breadboard Setup and Testing for micro:bit tutorial. In addition to the basic micro:bit adapter, power rail, and test post setup, it uses the following parts:

(1) LED – green
(1) resistor 220 Ω (red-red-brown-gold)
(1) jumper wire, black

  • Restore your setup to the way it was in the First Breadboard Circuit chapter’s Build the LED Circuit activity.
  • Remove the alligator clips for now, but leave behind the 3-pin headers.
  • If you just completed the Electrical Measurements chapter, you can leave the voltmeter and ohmmeter circuits, but make sure to remove the ammeter circuit’s 20 Ω resistor.
  • Compare your setup to the picture below, and verify that the circuit, power, and voltmeter connections all match.

Circuit

Instead of connecting the LED to the 3V supply rail on the breadboard, this activity requires a connection with a micro:bit I/O pin.

  • Disconnect the USB cable from the micro:bit.
  • Disconnect the LED circuit’s 220 Ω resistor lead from the bus strip’s 3V (+) column and connect it to P14.  In the picture, it’s connected to the left terminal strip’s (e, 16) socket.
  • Reconnect USB.  Don’t worry if the light doesn’t turn on, you haven’t loaded a script to make it do that yet.

 


Printer-friendly version
Script and Tests
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024

© 2025 Parallax Learn • Built with GeneratePress