I have found a page where a guy uses arduino to measure voltage. It works well.
The arduino shows the voltage across any battery connected in the serial monitor. So, is there any possible way to read the values of the serial monitor and then make a LED blink at only certain values.
For example i want a LED to blink only if the voltage is 3.75 volts. How do i do that?
I have done the 'if' and'else if' statements and it didnt work for me and i cannot understand whats wrong ( no problem in compiling and uploading the code) since am new to arduino.
Please help.
You're not 'reading the values of the serial monitor'. You're using the values that are already set in variables. The SM is only a display. The data exists, one thing you can do is show it on SM with a deliberate command. You are not somehow coding to say
'If serial monitor shows 3.75, blink led'
Due_unto:
Perhaps if you would be so kind as to show us what you have done so far, someone may be able to help.
I am not being able to login into my computer therefore i cannot share the code .. But its the same code as in the link .. Just that in the end i have added
If (voltage == '3.75') {
Else if (voltage =='0') {
DigitalWrite( led , LOW)