const int pot = A0;
const int led1 = 10;
const int led2 = 11;
const int led3 = 9;
const int led4 = 6;
void setup() {
// put your setup code here, to run once:
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int potValue = analogRead(pot);
int led1Cahyo = map(potValue,0,1023,0,255);
int led2Cahyo = map(potValue,0,1023,0,255);
int led3Cahyo = map(potValue,0,1023,0,255);
int led4Cahyo = map(potValue,0,1023,0,225);
analogWrite(led1,led1Cahyo);
analogWrite(led2,led2Cahyo);
analogWrite(led3,led3Cahyo);
analogWrite(led4,led4Cahyo);
delay(100);
}