-
13D print components
3D print the crystal base from Thingiverse. After this is done, start printing the crystal itself and while it's doing that we will assemble the electronics in the base.
-
6Remove small red LED on Digispark
Remove small power LED on Digispark board (close to the 5V connection on the board) as it is too bright and will interfere with our light show.
-
8Prepare to program board
Time to test the circuit! Follow the instructions on the Digistump website on how to install the appropriate software for connecting to the board https://digistump.com/wiki/digispark/tutorials/connecting
-
9Program firmware
Once you confirmed the connection, proceed to write to your board the Arduino sketch in this project. You should be greeted with a rather bright LED cycling through colors.
#include <Adafruit_NeoPixel.h> #ifdef __AVR__ #include <avr/power.h> // Required for 16 MHz Adafruit Trinket #endif #define PIXELPIN 0 Adafruit_NeoPixel strip = Adafruit_NeoPixel(1, PIXELPIN, NEO_GRB + NEO_KHZ800); void setup() { // put your setup code here, to run once: strip.begin(); strip.clear(); strip.show(); } void loop() { // put your main code here, to run repeatedly: static uint8_t i = 0; strip.setPixelColor(0, Wheel(i)); strip.show(); delay(20); i++; } uint32_t Wheel(byte WheelPos) { WheelPos = 255 - WheelPos; if(WheelPos < 85) { return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3); } if(WheelPos < 170) { WheelPos -= 85; return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3); } WheelPos -= 170; return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0); }
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.