Hi, this is the first time I'm using an arduino. So, I want to make a device which will light up different LEDs for different voltage when I press a key on a remote. Okay, suppose there is 3 volt supply through a wire so when the node or the nodes(I have not made the device I am just planing) are connected to the wire and I press a key in the remote, the device will show a blue LED. Again if the voltage is 5 there will be a red LED lighted up, green for 6 volt, yellow for 7 volt etc. So I need help in making the circuit, program it. Thanks in advance.
Hook up the voltage source to one of the analog inputs and use analogread to measure the voltage; store the measured value in a variable. Make sure that the voltage can not exceed the maximum input voltage for an analog pin (5V on 5V based Arduinos, 3.3V on 3.3V based Arduinos); you can use a voltage divider if needed.
Hook up the LEDs (with current limiting resistors) to a few pin of the Arduino.
Next read up on pinMode and digitalWrite to control a LED.
Lastly read up un if/else to determine which LED must be switched on based on the stored value.
So, I want to make a device which will light up different LEDs for different voltage when I press a key on a remote.
What do you press on the remote to get different voltages?
Do you want these different voltages to appear on the output of your Arduino?
You can only put 5V into an Arduino Uno ( less for some other types of Arduino ) - to measure more use a potential divider on the input.
You can only get 5V out of an Arduino Uno ( less for some other types of Arduino ) - to get more use a transistor with collector up to the maximum voltage you want to get and turn it down using PWM and a filter.