Add to this arduino sketch such that you can add threeexternally-connected LEDs to your circuit board. Modify this codesuch that the first LED turns on if the ADC output value is between0 and 340, the second LED turns on if the ADC output value isbetween 341 and 680, and the third LED turns on if the ADC outputvalue is above 680
int potpin=0;// initialize analog pin 0int ledpin=13;// initialize digital pin 13int val=0;// define val, assign initial value 0void setup(){pinMode(ledpin,OUTPUT);// set digital pin as “output”Serial.begin(9600);// set baud rate at 9600}void loop(){digitalWrite(ledpin,HIGH);// turn on the LED on pin 13delay(50);// wait for 0.05 seconddigitalWrite(ledpin,LOW);// turn off the LED on pin 13delay(50);// wait for 0.05 secondval=analogRead(potpin);// read the analog value of analog pin 0, and assign it to val Serial.println(val);// display val’s value}