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

    3D GO

    3D ModelsContestsCollectionsSaved ModelsOn a mobile device?

3D GO

Privacy Policy
Arduino-Controlled RGB Square Table Decor - 3x3 Grid USB-Powered 3D Printer File Image 1
Arduino-Controlled RGB Square Table Decor - 3x3 Grid USB-Powered 3D Printer File Image 2
Arduino-Controlled RGB Square Table Decor - 3x3 Grid USB-Powered 3D Printer File Thumbnail 1
Arduino-Controlled RGB Square Table Decor - 3x3 Grid USB-Powered 3D Printer File Thumbnail 2

Arduino-Controlled RGB Square Table Decor - 3x3 Grid USB-Powered

3D Print Workshop avatar3D Print Workshop

November 9, 2024

printables-icon
DescriptionCommentsTags

Description

Create a Stunning RGB Table Decor with Arduino Control!

Transform any space with this easy-to-build, Arduino-controlled RGB table decor featuring a 3x3 grid of vibrant squares. Each square lights up in customizable colors, perfect for adding dynamic lighting to your home, office, or events. Powered via USB for convenience, this project is simple to set up and offers endless possibilities for color combinations and patterns. Whether you’re a DIY enthusiast, a beginner with Arduino, or someone who loves tech-driven decor, this RGB table is a showstopper that combines functionality and creativity!

Key Features:

  • 3x3 RGB square grid layout
  • Arduino-controlled for custom color patterns
  • USB-powered for easy setup and use
  • Perfect for home or event table decor

Required Components:

  • 9 Neopixel RGB LEDs
  • Arduino Nano
  • USB cable for power and programming

Build your own RGB table and add a unique lighting element to your space today!
 

Here is the Arduino code:

#include <Adafruit_NeoPixel.h>

#define PIN            6   // Pin connected to the NeoPixels
#define NUM_PIXELS     9   // Total number of pixels (3x3 grid)

Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_PIXELS, PIN, NEO_GRB + NEO_KHZ800);

// Define the positions of the 3x3 grid (total 9 pixels)
int pixelPositions[9] = {0, 1, 2, 3, 4, 5, 6, 7, 8};

// Define unique colors for each block
uint32_t colors[9] = {
  strip.Color(255, 0, 0),    // Red
  strip.Color(0, 255, 0),    // Green
  strip.Color(0, 0, 255),    // Blue
  strip.Color(255, 255, 0),  // Yellow
  strip.Color(255, 0, 255),  // Purple
  strip.Color(0, 255, 255),  // Cyan
  strip.Color(255, 165, 0),  // Orange
  strip.Color(75, 0, 130),   // Indigo
  strip.Color(255, 255, 255) // White
};

// Function to gradually change the color of each pixel
void fadeToColor(int pixel, uint32_t targetColor, int delayTime) {
  uint8_t r = (targetColor >> 16) & 0xFF;
  uint8_t g = (targetColor >> 8) & 0xFF;
  uint8_t b = targetColor & 0xFF;

  uint8_t currentR = (strip.getPixelColor(pixel) >> 16) & 0xFF;
  uint8_t currentG = (strip.getPixelColor(pixel) >> 8) & 0xFF;
  uint8_t currentB = strip.getPixelColor(pixel) & 0xFF;

  // Fade the colors gradually
  for (int i = 0; i <= 255; i++) {
    uint8_t newR = currentR + (r - currentR) * i / 255;
    uint8_t newG = currentG + (g - currentG) * i / 255;
    uint8_t newB = currentB + (b - currentB) * i / 255;

    strip.setPixelColor(pixel, newR, newG, newB);
    strip.show();
    delay(delayTime);
  }
}

void setup() {
  strip.begin();  // Initialize the strip
  strip.show();   // Initialize all pixels to off
}

void loop() {
  // Gradually transition to each color for each block in the grid
  for (int i = 0; i < NUM_PIXELS; i++) {
    fadeToColor(i, colors[i], 20);  // Transition to color with a delay for smooth fade
  }
  
  delay(1000);  // Keep the colors for 1 second before transitioning again
}

License:

BSD License

Related Models

Cable Corners... keep cables in corners! preview image

Cable Corners... keep cables in corners!

muzz64 profile image

muzz64

30,975

Headset Hanger 2.0 preview image

Headset Hanger 2.0

RMTB profile image

RMTB

16,747

PetsTags preview image

PetsTags

Dominik profile image

Dominik

1,138

Universal Filament Filter and Lubricator preview image

Universal Filament Filter and Lubricator

CreativeTools profile image

CreativeTools

26,111

3D4U by Miele Coffee Clip preview image

3D4U by Miele Coffee Clip

3D4U powered by Miele profile image

3D4U powered by Miele

8,634

Simple Customizable Key tags  preview image

Simple Customizable Key tags

constantinost profile image

constantinost

159

SHARKZ... Fun Multipurpose Clips / Holders / Pegs with moving jaws that bite! preview image

SHARKZ... Fun Multipurpose Clips / Holders / Pegs with moving jaws that bite!

muzz64 profile image

muzz64

24,670

Mechanical wall clock preview image

Mechanical wall clock

Harald Andersson profile image

Harald Andersson

6,969