Yes, that's a simple and direct led circuit. I was trying to get fancy and have a single circuit be green while pulled down by the I/O and red while "open". Remembered just enough to get lost in a reversed bias transistor circuit.
In a robotics project and need an indicator to show the operator when the safety circuit is open or closed. Got it done in software but need a physical idiot light. Thinking a bright red/green bi-color led. Have 24 vdc constant supply and a pin that sinks to ground (100mA max) just while the...