The file 'XAIO RP2040 Twinkling Christmas Star 3D Printer Model' is (scad,stl,py) file type, size is 431.2KB.
A simple star powered by a SeeedStudio Xaio RP2040 using the onboard NeopPixel.
My printer handles overhangs well; I printed this as orientated in the STL file with a big brim on each 'foot' and supports enforced for the first 10 layers to keep it stable.
It is mounted via the USB cable, which is 2m long and cunningly threaded up behind the tree and discretely tied at the top.
If you fancy making one and want to support my work you can use my AliExpress affiliate links:
Coded in MicroPython
For a good primer on how to set the XIAO up with MicroPython and Thonny(*) go here:
https://wiki.seeedstudio.com/XIAO-RP2040-with-MicroPython/
The introduction and linked MicroPython sites are excellent; worth reading.
The sketch I use is a modified version of the demo they use; I added more randomness, speed and colors, this is more 'twinkly' than the given example!
There are lots of python + neopixel example scripts that would also work for this, especially if you find the twinkling too much.
Alternatively play with the speeds
and intensities
dictionary values in my script ;-)
main.py
from machine import Pinimport neopixelfrom utime import sleepfrom random import choicepixel = neopixel.NeoPixel(Pin(12), 1)pixelPower = Pin(11, Pin.OUT)pixelPower.on()speeds = range(1,6,1)intensities = [1,2,3,7,15,31,47,63,95,127,255]while True: val = choice(intensities) cycle = [(val,0,0),(val,val,0),(0,val,0),(0,val,val),(0,0,val),(val,0,val)] for pixel[0] in cycle: pixel.write() sleep(choice(speeds)*0.015)
(*) I quite like Thonny for small coding projects, and current versions support the RP2040 out of the box, but it is just one of a whole bunch of MicroPython enabled Integrated Development Environments and programming techniques. Look at the main MicroPython documentation to find discussion, comparison and links to alternatives.
Christmas-Tree-star.scad | 350.0B | |
Christmas-Tree-star.stl | 1011.9KB | |
main.py | 453.0B |