// https://wokwi.com/projects/346217286575587924
# include <Adafruit_NeoPixel.h>
# define TANKSIZE 23 // units and LEDs as well
# define NTANKS 3 // hardware. three tanks
# define LED_PIN 7
# define LED_COUNT 40
Adafruit_NeoPixel rings(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
void setup() {
Serial.begin(115200);
Serial.println("rings of LEDs\n");
rings.begin();
rings.show();
}
int nextLED;
void loop() {
rings.setPixelColor(nextLED, 0x0); // turn off the one that is on
nextLED++; // move to next LED
if (nextLED >= LED_COUNT) // maybe off the end!
nextLED = 0;
rings.setPixelColor(nextLED, 0xff0000); // turn on one LED
rings.show(); // and set all the LEDs to the new values
delay(133); // hang out for a bit so we can see it
}