Two US1881 Hall's sensors with light diodes to single analogue input

Good day.
I got Arduino Uno, there is lack of digital outputs in my project and 5 free analogue inputs. I require signals from two US1881 sensors, but for me it doesn't matter which sensor is produced signal, so two sensors to one inputs it's OK for me. Also, it's good to show with LED which on is currently on.
So, i draw scheme:


How do you think it will work?

The "Analog" pins can be used as "Digital" pins (input or output).
i.e.
const byte myOutput = A0;
pinMode (myOutput, OUTPUT);


digitalWrite(myOutput, HIGH);

Hi @DmitryDDD

Analog pins can be used as digital outputs and preferably use the nomenclature 14,15,16,17, 18, 19.
A0 = 14
A1 = 15
....
A5 = 19.
RV mineirin

"Preferably"?
A0, A1, A2, A3, A4, A5 work just fine
and remain consistent with the labelling.

Hi @runaway_pancake

Preferably to avoid confusion with analog names,
especially when using some as analogs and others as digital.

RV mineirin

A5 is 19. (Talk about "Confusion".)

Thanks guys, but is scheme correct? How great are my chances to burn Arduino board?)

They have 'open drain' outputs, so if it doesn't matter to you whether it's one, the other, or both -
then you should be "OK".

1 Like