int rit=0;
int lux=0;
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
rit = analogRead(A0);
//digitalWrite(5, HIGH); // turn the LED on (HIGH is the voltage level)
//digitalWrite(6, LOW);
// delay(rit); // wait for a second
// digitalWrite(5, LOW); // turn the LED off by making the voltage LOW
// digitalWrite(6, HIGH);
// delay(rit);
lux = map(rit , 0, 1023, 0, 255);
analogWrite(5,lux);
}