Lamp with WS2812B led
thingiverse
I design a lamp with three strips of WS2812B LEDs. Total 39 LEDs and an Arduino Nano to control the light. Adafruit effect, also known as FastLED. Please note I am not a programmer so this code is not professionally made but it works for me: https://gofile.io/?c=ZmQHGg #include <FastLED.h> #define NUM_LEDS 39 #define BRIGHTNESS 170 CRGB leds[NUM_LEDS]; void setup() { delay(3000); // power-up safety delay FastLED.addLeds<WS2812B, 3, GRB>(leds, 0, 13); // Pin 3, LED 0 to 13 FastLED.addLeds<WS2812B, 5, GRB>(leds, 13, 26); // Pin 5, LED 13 to 26 FastLED.addLeds<WS2812B, 7, GRB>(leds, 26, 39); // Pin 7, LED 26 to 39 FastLED.setBrightness(BRIGHTNESS); } void loop() { randomSeed(millis()); int wait = 30; rainbow(wait); } void rainbow(uint8_t wait) { uint16_t i, j; for (j = 0; j < 256; j++) { for (i = 0; i < NUM_LEDS; i++) { CRGB ledColor = wheel((i * 1 + j) & 255); leds[i] = ledColor; } FastLED.show(); FastLED.delay(wait); } } CRGB wheel(byte WheelPos) { CRGB color; if (WheelPos < 85) { color.r = WheelPos * 3; color.g = 255 - WheelPos * 3; color.b = 0; } else if (WheelPos < 170) { WheelPos -= 85; color.r = 255 - WheelPos * 3; color.g = 0; color.b = WheelPos * 3; } else { WheelPos -= 170; color.r = 0; color.g = WheelPos * 3; color.b = 255 - WheelPos * 3; } return color; }
With this file you will be able to print Lamp with WS2812B led with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Lamp with WS2812B led.