// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// Released under the GPLv3 license to match the rest of the
// Adafruit NeoPixel library
// Modified by ec2021 to set all "pixels" to the same color
// depending on the status of the two sliding potentiometers
#include <Adafruit_NeoPixel.h>
#define PIN 6
#define NUMPIXELS 16 // Popular NeoPixel ring size
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
#define DELAYVAL 500 // Time (in milliseconds) to pause between pixels
#define XPin A0
#define YPin A1
void setup() {
pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
pixels.clear(); // Set all pixel colors to 'off'
}
int Red = 0;
int Green = 0;
int valX = 0;
int valY = 0;
void loop() {
valX = analogRead(XPin);
Red = map(valX, 0,1023,0,255);
valY = analogRead(YPin);
Green = map(valY, 0,1023,0,255);
pixels.fill(pixels.Color(Red,Green, 0));
pixels.show(); // Send the updated pixel colors to the hardware.
}