09-14-2024, 11:11 PM
I've added a 50k resistor between each digital input and GND.
with that i was able to get proper reading from PNP sensor.
1. is that acceptable workaround? or would the constant current from D2 to GND harm the A6?
2. what is a recommended resistor from D2 to GND? (i tested 10k, and 50k, they both worked well).
with that i was able to get proper reading from PNP sensor.
1. is that acceptable workaround? or would the constant current from D2 to GND harm the A6?
2. what is a recommended resistor from D2 to GND? (i tested 10k, and 50k, they both worked well).
Code:
^
|------------| |
| |---Brown---VCC 12V-----+ |--------------|
| PNP Sensor | | |
| |---Black--output(12v)-----+---------| D2 |
| | | | |
| | | R=50K | | Kincony A6 |
| | | | |
| |---Blue---GND-------------+---------| GND |
|------------| |--------------|