-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add isAnode to Led Docs #1026
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
|
It does work for leds that are wired in reverse however. On Sat, Jan 30, 2016, 7:48 PM Scott González [email protected]
|
This topic comes up about every 6 months. We should definitely do something. I'd opt for removing it from
I suppose it's true that you could use |
There are 2 different ways to wire an LED to a microcontroller. The more common way is to wire the LED anode to the microcontroller pin and the cathode to ground (with a resistor between the mcu pin and the anode or the cathode and gnd). This is known as a "source drive" circuit since the mcu pin is sourcing the current to power the LED. The other way is "sync drive" in which the cathode is wired to the mcu pin and the anode is wired to power and current flows into the mcu (which can be more power efficient in some designs but likely makes little difference for prototypes and hobby applications). When using sync drive, you set the pin value to 0 rather than 1 to turn the LED on. Therefore it's necessary to provide a means to differentiate between the two configurations in order to determine if |
Here's a slightly more detailed explanation on source vs sync: https://startingelectronics.org/articles/current-sourcing-sinking/ |
That's really interesting, thanks for detailed explanation @soundanalogous. If Johnny-Five wants to support that configuration, |
button, joystick, motor and servo all have an |
I actually thought invert existed and had to look at the source to figure Both kinda make sense here, for both led and rgbled. I'm happy as long as On Mon, Feb 1, 2016, 9:36 AM Derek Wheelden [email protected]
|
Could you also have a common anode RGB LED that is similarly wired? That doesn't make sense to me, but I acknowledge that I hadn't heard of the "sync drive" case before, so maybe I'm missing it. |
Isn't it "sink drive"? I like |
I like |
@Resseguie If that's the case for |
|
@Frxnz I thought the same thing about having both, but I don't know if that's an actual case that exists. For a standard LED, you're just either applying power or not. For an "inverted"/sink drive RGB, what would be controlling the values to R-G-B respectively? That's why I didn't know if such a use case exists. If we go with |
So it's a docs issue now? On Tue, Feb 2, 2016, 11:28 AM Rick Waldron [email protected] wrote:
|
#258 is where it first got added, but RGB was still based off three LED instances then. Once Led.RGB became its own thing, |
Any consensus on this item? Will the inverted be created? |
I propose that we deprecate isAnode on LED (warning message) and add a syncDrive device type. It'll be the first device type in LED, but that's NBD. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
I'm going to keep this issue open. There is a consensus that we need to fix it, and the fix will be easy to implement. We do not need a device type. I was wrong, that is overkill. Functionally the Easy-peasy. Sound good? |
Sounds good
…On Sat, Oct 6, 2018, 10:01 AM Donovan Buck ***@***.***> wrote:
I'm going to keep this issue open. There is a consensus that we need to
fix it, and the fix will be easy to implement.
We do not need a device type. I was wrong, that is overkill.
Functionally the isAnode property does exactly what we need so I propose
that we rename it sinkDrive, update the docs and make isAnode an alias to
sinkDrive.
Easy-peasy. Sound good?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1026 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABlbgbqxRJGom7qafulXMcElc_iVcIXks5uiLfCgaJpZM4HP6Ji>
.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
No Stalebot! I've learned a lot about this in the past year, and a sinkDrive property is still the right way to go. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
It's missing as a possible property to the options.
The text was updated successfully, but these errors were encountered: