int sensor;
int led = 13;
int ledr= 7;
int ledy= 6;
int ledg= 5;
void setup()
{
Serial.begin(115200);
pinMode(A0, INPUT);
pinMode(led, OUTPUT);
pinMode(ledr, OUTPUT);
pinMode(ledy, OUTPUT);
pinMode(ledg, OUTPUT);
}
void loop()
{
sensor = analogRead(A0);
digitalWrite(ledr, 1);
delay(sensor);
digitalWrite(ledr, 0);
delay(sensor);
digitalWrite(ledy, 1);
delay(sensor);
digitalWrite(ledy, 0);
delay(sensor);
digitalWrite(ledg, 1);
delay(sensor);
digitalWrite(ledg, 0);
delay(sensor);
}