The three LED lights (red, green and blue) are fading with the time. The brightness changes every one second and the whole period is 10 seconds.
Through Serial communication, I send commands to the microprocesser and the NeoPixel light will shine with corresponding color in given times.
I also manage to implement same functions in MicroPython.
The Serial communication is different with Arduino as it uses stdin
to read
keyboard input and uses print
to write output through the Serial COM port.
One important lesson - disconnect the Serial COM port after uploading python code and then use the Serial Monitor in Arduino (putty also works in Windows) to build Serial communication with RP2040.
In order to achieve a more accurate fading period for LEDs, I try to use Timer
class and
it works well. However, it doesn't work smoothly when I combine the code with Serial communication functions.
I search online and find there are several cases that Timer
will crash if there are muliple tasks running.
For example, this issue indicats that
stateMachine may be overwritten by I2S initialization. I will dig into this problem later in the semester
to see if the soft Timer in RP2040 is somewhat problematic.
Notes:
1. Steampunk dice is inspired by
Heliox's design.
2. Internal support is required to pass Formlab's pre-check. It takes several iterations to find an adequate support that balances between how stable the
printed part will be and how easy to remove the support.
3. 25 µm resolution takes four times longer to print than 100 µm. However, the printing performance is not that different. So it is worthwhile to have
a fast prototype first and do all the necessary modifications then have a fine resolution print.
4. STL files can be found
here.