APC

Build a flashy dice roller with NeoPixels

The Raspberry Pi Pico is powered by a dual-core ARM CPU, and in this tutorial we will learn how to run two threads of MicroPython code independent of each other. The code in core 0 will wait for a user to press a button, and when they do, the code will choose a random number to emulate a D20 die roll. If the user is unsure what to do, a simple instruction will scroll across a seven-segment display, a TM1637 connected to the Raspberry Pi Pico using I2C.

The second core will run a light show, designed to entice the user to try our project. The light show is powered by a stick of WS2812B RGB LEDs, commonly known by the Adafruit brand of NeoPixels. These RGB LEDs require perfect timing in order

You’re reading a preview, subscribe to read more.

More from APC

APC3 min read
The CEO Of Spotify Is Anti-music
It’s easy to forget, but we live in a time of cosmic greed. It’s starting to resemble a self-consuming, ritualistic self-destruction. For those in the business of “content” – a term that basically means everything and nothing nowadays – the mask is s
APC2 min read
ViewSonic VG2756V-2K
27in MONITORS$839 | viewsonic.com As a rule, we’re fans of 1440p 27in screens. They feel more spacious than 1080p rivals, making it a pleasure to work on two windows side by side, and text looks sharp. This is one reason the BenQ BL2790QT wins a Reco
APC2 min read
Asus ROG Swift OLED PG32UCDM
PRICE $2,749 WEB rog.asus.com/au ‘Tis truly the age of the QD-OLED gaming monitor and now here’s Asus with its ROG Swift OLED PG32UCDM which seeks to offer premium performance in a super-premium package. As we’ve come to expect, it’s simple to piece

Related