Help with programming Neopixel Ring 24

Could anyone help me with figuring out how to program a potentiometer to control the brightness of the LEDs on the neopixel ring? This is my current setup as well as the code. I think I have the potentiometer wired correctly, but can't figure out how to program it to control the LEDs brightness while still supplying enough voltage to the LEDs. Any help or guidance is greatly appreciated. Also fair warning, I am new to programming and working on projects like this so I am not the most knowledgeable.

Setup:

Code:

include <Adafruit_NeoPixel.h>

ifdef AVR

#include <avr/power.h>
endif

define PIN 6

Adafruit_NeoPixel strip = Adafruit_NeoPixel(24, PIN, NEO_GRB + NEO_KHZ800); //
void setup() {
strip.begin(); strip.show(); // Initialize all pixels to 'off' }
void loop() {
colorWipe(strip.Color(25, 227, 227), 250); // Red colorWipe(strip.Color(25, 127, 227), 209); // Green colorWipe(strip.Color(25, 28, 227), 168); // Blue
colorWipe(strip.Color(123, 0, 255), 100); // Blue colorWipe(strip.Color(153, 25, 227), 45); // Green colorWipe(strip.Color(227, 25, 200), 20); // Red
colorWipe(strip.Color(153, 25, 227), 86); // Green colorWipe(strip.Color(123, 0, 255), 127); // Blue colorWipe(strip.Color(25, 28, 227), 168); // Blue colorWipe(strip.Color(25, 127, 227), 209); // Green colorWipe(strip.Color(25, 227, 227), 250); // Red
colorWipe(strip.Color(0, 0, 0, 255), 50); // White RGBW
}
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); } }

tjop92:
Could anyone help me with figuring out how to program a potentiometer to control the brightness of the LEDs on the neopixel ring?

Here's the code I use to run a 16 LED ring. You should be able to easily modify it for your needs (no need for a library):

////////////////////////////// WS2812B One Wire Timing ///////////////////////////////
//
//           _______________
//          |               |                        |
//  0 code: | <-- 350ns --> | <------ 900 ns ------> | <-- 1250 ns total (20~ @ 16mHz)
//          |               |________________________|
//
//
//           ________________________
//          |                        |               |
//  1 code: | <------ 900 ns ------> | <-- 350ns --> | <-- 1250 ns total (20~ @ 16mHz)
//          |                        |_______________|
//
//
//
//          |                                              |
//  RESET   | <------------- 50 us or more --------------> | <-- 50 us (800~ @ 16mHz)
//  Code:   |______________________________________________|
//
//
//  For EACH LED, a total of 10 us is spent sending data
//  (1250 * 8) = 10000 ns = 10 us.
//
//  For a 16 LED NeoPixel Ring, the total time for one update is
//  10 us * 16 = 160 us + reset 50 us = [ 210 us ]
//
//////////////////////////////////////////////////////////////////////////////////////
// note: data order for ws281x is GRN, RED, BLU (MSB First)
//
//      | <------- GRN -------> | <------- RED -------> | <------- BLU -------> |
// BIT: |23 22 21 20 19 18 17 16|15 14 13 12 11 10  9  8| 7  6  5  4  3  2  1  0|
//////////////////////////////////////////////////////////////////////////////////////


#define LED_OUT PORTB
#define LED_DDR DDRB
#define LED_BIT 7

#ifndef sbi
#define sbi(sfr,bit)((_SFR_BYTE(sfr)|=_BV(bit)))
#endif

#ifndef cbi
#define cbi(sfr,bit)((_SFR_BYTE(sfr)&=~_BV(bit)))
#endif

void send0 (void)
{
	sbi (LED_OUT, LED_BIT);
	__builtin_avr_delay_cycles ((((F_CPU / 1e9) * 350) + 0.5) - 2);
	cbi (LED_OUT, LED_BIT);
	__builtin_avr_delay_cycles ((((F_CPU / 1e9) * 900) + 0.5) - 2);
}

void send1 (void)
{
	sbi (LED_OUT, LED_BIT);
	__builtin_avr_delay_cycles ((((F_CPU / 1e9) * 900) + 0.5) - 2);
	cbi (LED_OUT, LED_BIT);
	__builtin_avr_delay_cycles ((((F_CPU / 1e9) * 350) + 0.5) - 2);
}

void send (uint8_t red, uint8_t grn, uint8_t blu)
{
	// note: data order for ws281x is G,R,B
	uint8_t x;
	x = 8;
	while (x--) {
		(_BV(x) & grn) ? send1() : send0();
	}
	x = 8;
	while (x--) {
		(_BV(x) & red) ? send1() : send0();
	}
	x = 8;
	while (x--) {
		(_BV(x) & blu) ? send1() : send0();
	}
}

void update (uint8_t *red, uint8_t *grn, uint8_t *blu, uint8_t count)
{
	cli();

	while (count--) { // count == number of LED's on strip
		send (red[count], grn[count], blu[count]);
	}
	__builtin_avr_delay_cycles ((F_CPU / 1e6) * 50);  // 50 usec reset

	sei();
}

int main (void)
{
#define LED_COUNT 16 // 16 leds on the strip

	uint8_t x;

	uint8_t red[LED_COUNT];
	uint8_t grn[LED_COUNT];
	uint8_t blu[LED_COUNT];

	init();
	Serial.begin (115200);

	sbi (LED_DDR, LED_BIT); // set neopixel data pin as output

	x = LED_COUNT;
	while (x--) {
		red[x] = 0; // initialize all leds off
		grn[x] = 0;
		blu[x] = 0;
	}
	update (red, grn, blu, LED_COUNT);


	red[0] = 255; // set first led full bright red
	grn[1] = 255; // set second led full bright green
	blu[2] = 255; // set third led full bright blue
	update (red, grn, blu, LED_COUNT); // update strip

	while (1); // that's all we do for now
}

Maybe I missed it in the piss-poor way your code is laid out, but I didn't see anywhere where you actually read the potentiometer.

Maybe I missed it in the piss-poor way your code is laid out, but I didn't see anywhere where you actually use the value to influence the color. ALL that I see is a bunch of hard-coded color values.