Hackster is hosting Hackster Holidays, Finale: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Tuesday!Stream Hackster Holidays, Finale on Tuesday!
Alex Glow
Published © GPL3+

Pixelboard: Skateboard Lighting with NeoPixels

Use Python to program some sweet ground-effect lighting animations for the Hackster Glowboard! Powered by the BBC Micro:bit. ✨

IntermediateFull instructions provided2 hours2,560

Things used in this project

Hardware components

BBC micro:bit board
BBC micro:bit board
×1
Adafruit NeoPixel Strip
×1
Adafruit 3.7v LiPo rechargeable battery
×1
Slide Switch
Slide Switch
×1

Software apps and online services

MakeCode
Microsoft MakeCode

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Schematics

Wiring (Fritzing file)

An editable file showing the wiring in detail.

Code

PixelBoard code – JavaScript

JavaScript
Paste this into the MakeCode editor – or open it at https://makecode.microbit.org/_HXW1jWPe0Hqv – then download the .hex file and drop it onto your Micro:bit USB flash device! Based on Adafruit's tutorial code: https://learn.adafruit.com/micro-bit-lesson-3-neopixels-with-micro-bit/software
let item: neopixel.Strip = null
let ring: neopixel.Strip = null
let index = 0
ring = neopixel.create(DigitalPin.P2, 12, NeoPixelMode.RGB)
item = neopixel.create(DigitalPin.P1, 8, NeoPixelMode.RGB)
basic.forever(function () {
    for (let index = 0; index <= 11; index++) {
        ring.setPixelColor(index, neopixel.colors(NeoPixelColors.Blue))
        ring.show()
        basic.pause(50)
        ring.setPixelColor(index, neopixel.rgb(16, 16, 16))
        ring.show()
    }
})
basic.forever(function () {
    for (let index = 0; index <= 7; index++) {
        item.setPixelColor(index, neopixel.colors(NeoPixelColors.Blue))
        item.show()
        basic.pause(50)
        item.setPixelColor(index, neopixel.rgb(16, 16, 16))
        item.show()
    }
})

Credits

Alex Glow
149 projects • 1595 followers
The Hackster team's resident Hardware Nerd. I love robots, music, EEG, wearables, and languages. FIRST Robotics kid.

Comments