const int potentiometer = A0;
int potentioValue = 0;
void setup() {
Serial.begin(115200); // Any baud rate should work
for(int i = 2; i < 12; i++){
pinMode(i, OUTPUT);
}
// put your setup code here, to run once:
}
void loop() {
potentioValue = analogRead(potentiometer);
int mappedValue = map(potentioValue, 0, 1023, 0, 255);
for(int i = 2; i < 12; i++){
analogWrite(i, mappedValue);
}
Serial.println(mappedValue);
// delay(2000);
// put your main code here, to run repeatedly:
}