• Models
  • Contests
  • Slicer
  • Login
  • Start Here
    thingiverse-iconprintables-iconcults3d-iconmakerworld-iconmyminifactory-icon

    3D GO

    3D ModelsContestsCollectionsSaved ModelsOn a mobile device?

3D GO

Privacy Policy
Rgb Light Bar 3D Printer File Image 1
Rgb Light Bar 3D Printer File Image 2
Rgb Light Bar 3D Printer File Image 3
Rgb Light Bar 3D Printer File Image 4
Rgb Light Bar 3D Printer File Thumbnail 1
Rgb Light Bar 3D Printer File Thumbnail 2
Rgb Light Bar 3D Printer File Thumbnail 3
Rgb Light Bar 3D Printer File Thumbnail 4

Rgb Light Bar

Areox3D avatarAreox3D

January 18, 2021

printables-icon
DescriptionCommentsTags

Description

This is a light bar (rgb). It is designed for easy printing and easy assembly. It is a decoration for a desk or as a relaxation lamp. The light bar uses the Arduino nano. You can load your chosen code into this chip, such as: rainbow, fire flames, and many more.

°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
RAINBOW CODE FOR ARDUINO NANO HERE:

include <Adafruit_NeoPixel.h>

include <avr/power.h>

define PIN 6

Adafruit_NeoPixel strip = Adafruit_NeoPixel(20, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
// This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket

if defined (AVR_ATtiny85)

if (F_CPU == 16000000) clock_prescale_set(clock_div_1);

endif

// End of trinket special code
strip.begin();
strip.show(); // Initialize all pixels to 'off'
}
void loop() {
rainbowCycle(10);
}
// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
for(uint16_t i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, c);
strip.show();
delay(wait);
}
}
void rainbow(uint8_t wait) {
uint16_t i, j;
for(j=0; j<256; j++) {
for(i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, Wheel((i+j) & 255));
}
strip.show();
delay(wait);
}
}
// Slightly different, this makes the rainbow equally distributed throughout
void rainbowCycle(uint8_t wait) {
uint16_t i, j;
for(j=0; j<2565; j++) { // 5 cycles of all colors on wheel
for(i=0; i< strip.numPixels(); i++) {
strip.setPixelColor(i, Wheel(((i
256 / strip.numPixels()) + j) & 255));
}
strip.show();
delay(wait);
}
}
//Theatre-style crawling lights.
void theaterChase(uint32_t c, uint8_t wait) {
for (int j=0; j<10; j++) { //do 10 cycles of chasing
for (int q=0; q < 3; q++) {
for (int i=0; i < strip.numPixels(); i=i+3) {
strip.setPixelColor(i+q, c); //turn every third pixel on
}
strip.show();
delay(wait);
for (int i=0; i < strip.numPixels(); i=i+3) {
strip.setPixelColor(i+q, 0); //turn every third pixel off
}
}
}
}
//Theatre-style crawling lights with rainbow effect
void theaterChaseRainbow(uint8_t wait) {
for (int j=0; j < 256; j++) { // cycle all 256 colors in the wheel
for (int q=0; q < 3; q++) {
for (int i=0; i < strip.numPixels(); i=i+3) {
strip.setPixelColor(i+q, Wheel( (i+j) % 255)); //turn every third pixel on
}
strip.show();
delay(wait);
for (int i=0; i < strip.numPixels(); i=i+3) {
strip.setPixelColor(i+q, 0); //turn every third pixel off
}
}
}
}
// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
WheelPos = 255 - WheelPos;
if(WheelPos < 85) {
return strip.Color(255 - WheelPos 3, 0, WheelPos 3);
} else if(WheelPos < 170) {
WheelPos -= 85;
return strip.Color(0, WheelPos 3, 255 - WheelPos 3);
} else {
WheelPos -= 170;
return strip.Color(WheelPos 3, 255 - WheelPos 3, 0);
}
}

License:

Creative Commons — Public Domain

Related Models

#3DBenchy - The jolly 3D printing torture-test by CreativeTools.se preview image

#3DBenchy - The jolly 3D printing torture-test by CreativeTools.se

CreativeTools profile image

CreativeTools

90,968

Important information sign for 3D printers / Wichtiges Hinweisschild für 3D-Drucker :) preview image

Important information sign for 3D printers / Wichtiges Hinweisschild für 3D-Drucker :)

Pat_S profile image

Pat_S

3d Printer Printing 3d Printer preview image

3d Printer Printing 3d Printer

JAJMWHungFamily profile image

JAJMWHungFamily

961

Self-Watering Planter (Small) preview image

Self-Watering Planter (Small)

parallelgoods profile image

parallelgoods

73,196

X, Y and Z calibration tool for IDEX / dual extruder / dual color 3D printers preview image

X, Y and Z calibration tool for IDEX / dual extruder / dual color 3D printers

Voxel3D_NL profile image

Voxel3D_NL

207

sign: don't touch my 3d printer preview image

sign: don't touch my 3d printer

Izzodesign74 profile image

Izzodesign74

666

All In One 3D Printer test preview image

All In One 3D Printer test

majda107 profile image

majda107

64,542

axes calibrage cube-xyz for 3d printers preview image

axes calibrage cube-xyz for 3d printers

H- printed profile image

H- printed

9

7