Arnov Sharma
Published © LGPL

NeoPixel RGB Mixinator

NeoPixel ring based RGB color mixer.

BeginnerFull instructions provided2 hours2,999

Things used in this project

Hardware components

Rotary potentiometer (generic)
Rotary potentiometer (generic)
×3
NeoPixel Ring: WS2812 5050 RGB LED
Adafruit NeoPixel Ring: WS2812 5050 RGB LED
×1
UTSOURCE Electronic Parts
UTSOURCE Electronic Parts
everything above can be found here for a low price
×1
Arduino UNO
Arduino UNO
×1
JLCPCB Customized PCB
JLCPCB Customized PCB
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Custom parts and enclosures

body

pot cap

cap

Schematics

sch

Code

code

C/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); 
  }
}

Credits

Arnov Sharma

Arnov Sharma

265 projects • 272 followers
Just your average MAKER

Comments