Project tutorial

NeoPixel RGB Mixinator © LGPL

NeoPixel ring based RGB color mixer.

  • 347 views
  • 0 comments
  • 5 respects

Components and supplies

Necessary tools and machines

3drag
3D Printer (generic)

Apps and online services

About this project

Watch the video.

I first used Fusion360 to make an enclosure for this simple setup which consists of three potentiometers, an Arduino Nano, and a NeoPixel Ring which has 12 WS2812 RGB LEDs.

Originally I was planning to use an ATtiny85 to control the RGB but it only has two analog inputs but the requirement was three analog inputs so I used this Nano clone instead.

Well first, print all the parts.

Then connect all the things together using wires or you can create a shield, like I did.

From there, download and install the Adafruit NeoPixel library, and upload the sketch.

Here's the link - https://github.com/adafruit/Adafruit_NeoPixel

Thingiverse link - https://www.thingiverse.com/thing:4079529


Code

codeC/C++
#include <Adafruit_NeoPixel.h>
#define NEOPIXELS 12 
#define LEDsPin 9   
const int redPotPin = A0;      
const int greenPotPin = A1;   
const int bluePotPin = A2;  
int redValue = 0; 
int greenValue = 0; 
int blueValue = 0; 
int redPotValue = 0; 
int greenPotValue = 0; 
int bluePotValue = 0; 

Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NEOPIXELS, LEDsPin, NEO_GRB + NEO_KHZ800);
void setup() {
  pinMode(LEDsPin, OUTPUT);
  pinMode(redPotPin, INPUT);
  pinMode(greenPotPin, INPUT);
  pinMode(bluePotPin, INPUT);
}
void loop() {
  redPotValue = analogRead(redPotPin);
  delay(5);
  greenPotValue = analogRead(greenPotPin);
  delay(5);
  bluePotValue = analogRead(bluePotPin);
  redValue = map(redPotValue, 0, 1023, 0, 255);
  greenValue = map(greenPotValue, 0, 1023, 0, 255);
  blueValue = map(bluePotValue, 0, 1023, 0, 255);;
 
   for (int i = 0; i < NEOPIXELS; i++) {
    
    pixels.setPixelColor(i, pixels.Color(redValue, greenValue, blueValue));
    pixels.show(); 
    delay(50); 
  }
}

Custom parts and enclosures

Schematics

Comments

Similar projects you might like

Arduino Clock with Neopixel Ring Animation

Project tutorial by Alexander

  • 53,284 views
  • 44 comments
  • 78 respects

Simple 3D-Printed WS2812-Based RGB Lamp

Project in progress by Arnov Sharma

  • 1,191 views
  • 0 comments
  • 4 respects

RGB Camera Backlight Control With Android Mobile

Project tutorial by DIY Partners

  • 2,368 views
  • 1 comment
  • 8 respects

NeoPixel SkateBoard

Project tutorial by Dante Roumega

  • 1,319 views
  • 2 comments
  • 8 respects

Stereo NeoPixel Ring VU Meter

Project showcase by ericBcreator

  • 61,041 views
  • 348 comments
  • 139 respects

Neopixel LED EyeBall

Project tutorial by HomeMadeGarbage

  • 7,213 views
  • 22 comments
  • 29 respects
Add projectSign up / Login