The £4 Raspberry Pi Pico is powered by a dualcore 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 to display the correct colour,