And here is how I would do it
#include <FastLED.h>
#define DATA_PIN 2
#define DATA_PIN2 3
#define DATA_PIN3 4
#define NUM_LEDS 8
#define NUM_LEDS2 24
#define NUM_LEDS3 5
#define pot A1
CRGB leds[NUM_LEDS];
CRGB leds2[NUM_LEDS2];
CRGB leds3[NUM_LEDS3];
const byte button = 6;
void setup() {
pinMode (button,INPUT_PULLUP);
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
FastLED.addLeds<NEOPIXEL, DATA_PIN2>(leds2, NUM_LEDS2);
FastLED.addLeds<NEOPIXEL, DATA_PIN3>(leds3, NUM_LEDS3);
Serial.begin(9600);
}
void loop () {
FastLED.clear();
FastLED.show();
int bet = selectinner();
int wheel = outerwheel ();
if (bet==wheel/3) win();
else lose();
while (button) {}
}
int selectinner () {
int bet;
int oldbet = NUM_LEDS;
do {
int potvalue = readpot();
bet = map(potvalue,0,1023,0,NUM_LEDS-1);
Serial.print (potvalue);
Serial.print ("\t");
Serial.println (bet);
if (oldbet!=bet) {
oldbet = bet;
FastLED.clear();
leds[bet] = CRGB::Blue;
FastLED.show();
// delay(20);
}
} while (button);
return bet;
}
int readpot() {
int potvalue = analogRead(pot);
for (int i=0;i<4;i++) {
potvalue += analogRead(pot);
delay(20);
}
return potvalue / 5;
}
int outerwheel () {
const int mindelay = 50;
const int maxdelay = 500;
const byte spins = 7;
int spinIt = random(255);
spinIt = map (spinIt, 0, 255, 0, NUM_LEDS2-1);
int maxnum = spins * NUM_LEDS2 + spinIt;
int count = 0;
for (byte i=0;i<spins;i++) {
for (byte j=0;j<NUM_LEDS2;j++) {
byte prevled = j-1;
if (prevled<0) prevled = NUM_LEDS2 - 1;
leds2[prevled] = CRGB::Black;
leds2[j] = CRGB::Cyan;
FastLED.show();
count++;
int vardelay = map(count,0,maxnum,mindelay,maxdelay);
delay(vardelay);
}
}
for (byte j=0;j<spinIt;j++) {
byte prevled = j-1;
if (prevled<0) prevled = NUM_LEDS2 - 1;
leds2[prevled] = CRGB::Black;
leds2[j] = CRGB::Cyan;
FastLED.show();
count++;
int vardelay = map(count,0,maxnum,mindelay,maxdelay);
delay(vardelay);
}
return spinIt;
}
void win() {
for (int i=0;i<NUM_LEDS3;i++) leds3[i] = CRGB::Green;
FastLED.show();
}
void lose () {
for (int i=0;i<NUM_LEDS3;i++) leds3[i] = CRGB::Red;
FastLED.show();
}
Again not tested nor compiled, there may be some mistakes but you can use it as you want.
Edit : it compiled