Quote Originally Posted by mackrackit View Post
Hey Robert,
Can you give some example code for how the square wave method would work?
Say you have something like the sliding door app.
Green = full open
Red = closed
OFF = inbetween
Yellow = moving
Mackrackit,

I'm going to order this part and test it to see if it works. The square wave is just a simple 50% duty cycle wave. By using the circuit provided by Scalerobotics, then if the square wave is low the red lights up and if the square wave is high then the green lights up.

A rapid changing of colors red -> green -> red -> green -> .... would appear to be yellow. It is just an optical illusion. Remember that I talking about a red-green LED with both colors in the same LED casing. Still, I would need to test it to see if it works.

Robert

Name:  dual-led3-3.JPG
Views: 2150
Size:  90.2 KB