I have little enclosure with 4 LEDs (red, green, blue, yellow) which indicate 6 status (receiver):
1: only red
2: only green
3: only blue
4: only yellow
5: red-green
6: blue-yellow
How can I track this 6 status (HIGH or LOW signals) without diodes using digital pins from arduino?
What I have to do after cutting wires? There are 4 wires connected to 4 diodes over resistors and fifth wire is finally connected to switch.
A have photo of my open enclosure (receiver) but can't post here ?!
Forgive me if I'm confused. Are you trying to light up those 4 LEDs based on that logic, or are you trying to get your arduino to know when each of those conditions is met (i.e. the LEDs will be lit by some external system)?
I'm trying to get my arduino to know when each of those conditions is met but without diodes (only 0 or 1).
(i.e. I want to know if the signal on wire 1 is HIGH or LOW)
int inPin1 = 9;
int inPin2 = 10;
int inPin3 = 11;
int inPin4 = 12;
Sorry that's a bit useless, too small to see anything useful.
Is the thing that drives the LEDs a 5V device? This matters a lot.
Is the driver of your device an open collector driver? It shouldn't be.
If it is true then you can:-
Connect the ground of your device to the ground of the arduino.
Connect each of the wires that used to go to the LED to the arduino input pins. Run the code as you have written it.
If you don't know any of the above questions get test equipment (voltmeter or oscilloscope) and find out.
Ok so it's a bigger picture of something that doesn't show anything useful.
I understood that these LEDs existed already. I can see that this device has batteries but how many and what sort of regulator does it have. If it is a boost regulator then it could be operating on any voltage.
It looks like 100R or maybe 1K series resistors but are they being driven as current source or sink.
The point is that these is not enough information about this device to let me know if wiring the outputs direct to the Arduino is going to work.
In that case maybe the best bet is to wire the LED side of an opto isolator in place of the LEDs and connect the transistor side to the Arduino, Collector to input pin emitter to ground.
I don't know what is inside. This device has 2 batteries (2x1.5V) and 4 isolated resistors. I'd like to bypass leds and resistors (poor contacts) and put new resistors. But what are the values?
How can I calculate the values of a resistors and keep arduino safe?
The value is written on the resistors in the form of colored bands. But they are not clear in the photograph. It looks like Brown Black Red, or maybe Brown Black Brown. That would make the resistors either 1K or 100R.
So if you know nothing about the device then using opto isolators would keep your Arduino safe.
No, you replace the LEDs with opto isolators and leave the resistors in place. Don't measure them just tell me what colour the bands are, it's not clear in the photograph.
I will tell you for color when coming home. But I can measure them, replace with new resistors (same values) and raplace LEDs with opto isolator.
Tell me pls what opto isolator is and how to connect it instead of leds (on breadboard).
In that case maybe the best bet is to wire the LED side of an opto isolator in place of the LEDs and connect the transistor side to the Arduino, Collector to input pin emitter to ground.