Skip to main content

1.1

Major VersionM

by Pete Prodoehl

Introduction

Connect a NeoPixel Stick to a Bit Board and control it with code.

We'll explore how to control an Addressable RGB LED Strip (also called "NeoPixels").

Video Overview

Featured Document

  1. The magical thing about these “Individually Addressable” LEDs is that you don’t have to connect each LED to an individual pin on your micro:bit, you just need one signal wire along with power (Positive and Negative) to light things up. So let's get connected! If you turn the NeoPixel Strip over you'll see labels for the three pins. You should see IN, VCC, and GND. Use the Crazy Circuits Ribbon Cable to connect the NeoPixel Strip to the Bit Board.
    • The magical thing about these “Individually Addressable” LEDs is that you don’t have to connect each LED to an individual pin on your micro:bit, you just need one signal wire along with power (Positive and Negative) to light things up.

    • So let's get connected! If you turn the NeoPixel Strip over you'll see labels for the three pins. You should see IN, VCC, and GND.

    • Use the Crazy Circuits Ribbon Cable to connect the NeoPixel Strip to the Bit Board.

    • The end with S1, +, and - can plug directly into the Pin 13 row (make sure S1 goes into 13) and the other end should plug into the NeoPixel Strip as shown.

    • We only need three wires for the NeoPixel Strip so you can leave S2 (the Orange wire) unconnected.

  2. To mount the NeoPixel Stick in place we used our NeoPixel Beam Holder with a long Technic Beam and two 1x1 LEGO bricks. You can always use rubber bands, tape, or some other method. The important thing is to make sure the connector is on the left hand side so the number index for the NeoPixel strip makes sense.
    • To mount the NeoPixel Stick in place we used our NeoPixel Beam Holder with a long Technic Beam and two 1x1 LEGO bricks.

    • You can always use rubber bands, tape, or some other method.

    • The important thing is to make sure the connector is on the left hand side so the number index for the NeoPixel strip makes sense.

  3. If you've never used a micro:bit before you'll want to check out this guide:  Bit Board V2 Setup and Use
    • If you've never used a micro:bit before you'll want to check out this guide: Bit Board V2 Setup and Use

    • We're going to load the following code for our NeoPixel Rotate RGB program: https://makecode.microbit.org/_hWX060aT0...

    • The rotate function can "move" a light sequence down the strip. Here we've set red, green, and blue pixels then we rotate them in a while loop.

    • The rotate function (as well as the shift function, which we'll see in other guides) can be a bit complex, but we'll explore them in the next few chapters.

    • Once the code is loaded it should start running immediately.

    • You can power the micro:bit via the USB cable you used to load the code or you can use a battery pack plugged into the Bit Board.

    • You should see red, green, and blue pixels (starting at the second NeoPixel) shift to the end of the stick and then "wrap around" to the beginning again.

    • Follow along with our recorded Live Stream!

    • You can watch the full video of us walking through this project, along with explaining and exploring the code: https://youtube.com/live/0AHEZyJg4M0

Finish Line

Pete Prodoehl

Member since: 3/4/20

1,840 Reputation

424 Guides authored

0 Comments

Add Comment



View Statistics:

Past 24 Hours: 1

Past 7 Days: 2

Past 30 Days: 2

All Time: 31