I made this schematic.
I write this code.
I want this :
- if I push button on gpio.3, gpio.5 goes high UNTILL voltage at AN3 goes OVER 550 mV or I push again the button ;
- idem for gpio.2 -> gpio.0.
My problems are :
- AN1 must be on Vdd ?
- the calculation of vt (voltage at AN3) is correct ? ( I use 10 bit resolution, so 5000/1024= 4,88 -> con1 = 4 & con2 = 88). Can someone to explain me more accurate ? Maybe I must use 12 V for calculation ?!
Thanks in advance for every reply !
Bookmarks