#define LED_PIN 3
#define LED1_PIN 5
#define LED2_PIN 6
#define LED3_PIN 9
#define LED4_PIN 10
#define LED5_PIN 11
#define POTENTIOMETER_PIN A1
void setup()
{
pinMode(LED_PIN, OUTPUT);
pinMode(LED1_PIN, OUTPUT);
pinMode(LED2_PIN, OUTPUT);
pinMode(LED3_PIN, OUTPUT);
pinMode(LED4_PIN, OUTPUT);
pinMode(LED5_PIN, OUTPUT);
pinMode(POTENTIOMETER_PIN, INPUT);
}
void loop()
{
int potentiometerValue = analogRead(POTENTIOMETER_PIN);
int brightness = potentiometerValue / 4;
analogWrite(LED_PIN, brightness);
analogWrite(LED1_PIN, brightness);
analogWrite(LED2_PIN, brightness);
analogWrite(LED3_PIN, brightness);
analogWrite(LED4_PIN, brightness);
analogWrite(LED5_PIN, brightness);
}