element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
microbit
  • Learn
  • Learning Center
  • STEM Academy
  • microbit
  • More
  • Cancel
microbit
micro:bit Blog [PROJECT] BBC Micro:bit – Light Show Sequencer – version 1 by Cabe
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join microbit to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Catwell
  • Date Created: 22 Jul 2019 3:37 PM Date Created
  • Views 1708 views
  • Likes 7 likes
  • Comments 2 comments
  • project
  • advanced micro:bit projects
  • hmi
  • microbit
  • control
  • light
  • diy
  • advanced_microbit_projects
  • led
  • special effects
  • light show
  • cabeatwell
  • code
Related
Recommended

[PROJECT] BBC Micro:bit – Light Show Sequencer – version 1 by Cabe

Catwell
Catwell
22 Jul 2019

image

The three LED Light Show. The start of everything. (All images and videos from me.)

 

Like programming a sound sequence, I thought it would be useful to do the same thing with light. In this project we will start working on developing a Light Show Sequencer.

 

To make it simple, I will start with just 3 LEDs. I used the same kind of interface as in the Sound Sequencer project. Although the buttons are clicky, it does the job. Feel free to use any sort of keypad you want.

 

The goal was not only a real-time sequencing of light flashes, but also duration the light is on. So, hold the button down on one light for a long time, the program will remember the duration.

 

 

The software works as follows:

- Power it up.

- It will be in Play mode and flash a “play triangle” on the Micro:bit’s LED screen.

- Now, you can press any of the 3 buttons corresponding to each LED. You’ll notice when you press them, the numbers 0, 1, and 2 will show on the screen. This is indicating which LED is being pressed.

- Press button “A” and “B” simultaneously and it will switch to record mode. A “record circle” will display on the screen.

- At this point, the program is waiting for you to press the light sequence you want. So, press the LED buttons any way you wish.

- Then press the “B” button, it will stop recording and start playing the sequence you made in a continuous loop.

- Press the “A” button to return to play mode.

 

 

First, let’s gather all the necessary components you’ll need to build this project.

1x BBC Micro:bit

1x Kitronik Inventor’s Kit

1x Half-Breadboards

Project Wires Female - Male

Project Wires Female - Female (aka jumper wires)

3x 1k Resistor

3x LEDs of your choice (If you have the Kitronik kit, there are a few in there to use

1x 5v 2A power supply

 

Video demonstration of the project:

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

STEP 1

Load the code onto the Micro:bit.

I am providing the hex file you need to drag and drop onto the Micro:bit, and the python code as two separate files. For the below process, just use the hex file.

 

Plug the MicroUSB cable into the Micro:bit, and plug the other end of the cable to a PC or MAC.

 

At this point, you are going to copy over the code to the Micro:bit. I am providing the program (code) in this post that needs to be copied over. When the Micro:bit plugs into a computer, it shows up as a USB flash drive. All you have to do is copy the file over to the Micro:bit, like it’s a USB Flash Drive, and the Micro:bit will reset, and the program is active.

 

You can remove the Micro:bit from the computer at this point. The program will start running, and without the rest of the circuit, it will not function.

 

●

A little bit about the code:

image

The sequence is stored on the Micro:bit as a text file, technically. See above.

 

The rest of the code is commented fairly well if you want to see what is going on in it.

 

STEP 2

Wire up the schematic to the breakout board.

 

This project has a fairly large schematic.

 

Only 4 pins on the Micro:bit are used for the keypad. On the schematic, they are labeled R1, R2, L1, L2.

I used a 4x4 matrix keypad for this project. You can use any type of matrix keypad as long as it has eight buttons.

I then used female-female project wires to connect the pad to the Micro:bit breakout board.

 

 

image

Note: Pins 0, 1, 2 on the Micro:bit is the LEDs in order. So, however you want the LEDs to be arranged, keep this order in mind. Also, max current for the LEDs is 5mA. Be sure to add the resistors.

 

 

STEP 3

Setup

- Power it up. Plug in the 5V adapter.

 

- It will be in Play mode and flash a “play triangle” on the Micro:bit’s LED screen.

 

- Now, you can press any of the 3 buttons corresponding to each LED. You’ll notice when you press them, the numbers 0, 1, and 2 will show on the screen. This is indicating which LED is being pressed.

 

- Press button “A” and “B” simultaneously and it will switch to record mode. A “record circle” will display on the screen.

 

- At this point, the program is waiting for you to press the light sequence you want. So, press the LED buttons any way you wish. Each key press is stored as two elements. Pressing a key and released key set a relative time interval. Even if you press no keys, a no input is stored as a “-1.”

 

- Then press the “B” button, it will stop recording and start playing the sequence you made in a continuous loop.

 

- Press the “A” button to return to play mode.

 

 

Conclusion:

This is a great first step towards building larger light sequencers. Even this one is useful. You could connect solenoids in place of the LEDs and control larger lights or banks of lights.

Attachments:
Microbit Light Show Sequencer by Cabe Atwell.zip
  • Sign in to reply

Top Comments

  • Catwell
    Catwell over 5 years ago in reply to genebren +2
    I would agree... but that code was out of control. I tried to make it simpler, for some reason I couldn't. Thanks for the accolades. C
  • genebren
    genebren over 5 years ago +1
    Fun little project. I could see this as a great project for teaching kids. Gene
  • Catwell
    Catwell over 5 years ago in reply to genebren

    I would agree... but that code was out of control.

    I tried to make it simpler, for some reason I couldn't.

     

    Thanks for the accolades.

    C

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • genebren
    genebren over 5 years ago

    Fun little project.  I could see this as a great project for teaching kids.

     

    Gene

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube