Skip to content
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

Brightness Logic Inverted #59

Closed
ItzHaad opened this issue Sep 19, 2020 · 3 comments
Closed

Brightness Logic Inverted #59

ItzHaad opened this issue Sep 19, 2020 · 3 comments

Comments

@ItzHaad
Copy link

ItzHaad commented Sep 19, 2020

So i am using my esp32 wemos lolin32 board, for some reason the brightness logic is inverted. Set(255) cause LED to turn Off and Set( 0) causes LED to turn on. The Brightness scale is 255 to 0 , with 255 being the max and 0 being the lowest. The max brightness function also behaves a little erroneously when used with effects but correcting the brightness logic would solve this problem. The same is the case with effects(without adding max brightness) fade on becomes fade off and vice versa. I think it may be a problem that code isn't best suited for some/all of the esp32 boards?

@ItzHaad
Copy link
Author

ItzHaad commented Sep 19, 2020

I cant determine whether the breathe function looks fine or not, maybe because it involves both fade in and fade out, so it is difficult to determine which comes first. But one thing i did notice that it stays bright more than it stays dark. I don't know if it is the function's general behavior or due to the values being inverted in the waveform.

@jandelgado
Copy link
Owner

I‘m not sure of I understood what your exact Problem is. But for inverted Outputs as described by you, you should try to use LowActive()

https://github.com/jandelgado/jled#low-active-for-inverted-output

br Jan

@ItzHaad
Copy link
Author

ItzHaad commented Sep 20, 2020

Yep, that was the problem, my on-board led was pulled low.

@ItzHaad ItzHaad closed this as completed Sep 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants