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

Yhfudev master #22

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Yhfudev master #22

wants to merge 5 commits into from

Conversation

yhfudev
Copy link

@yhfudev yhfudev commented Jul 19, 2016

Hi,

I updated the source to be used in one of my project. It includes fixing compile error, adding keywords, automatically button status detecting, and a enhanced fade control.

yhfudev added 5 commits July 18, 2016 16:33
… to setup the button before using the Atm_button, for example, the user can wire their button either 'pullup'(connect the button to ground and pinMode( pin, INPUT_PULLUP )) or 'pulldown'(connect the button to VCC, add a pulldown reistor to ground and pinMode( pin, INPUT ))
@tinkerspy
Copy link
Owner

Hi Yunhui Fu,

Thanks for your pull request. I made the changes to ATm_controller.cpp and keywords.txt.

Could you explain a bit further what the chnages to Atm_button and Atm_fade do?

Rgdz,
Tinkerspy

@yhfudev
Copy link
Author

yhfudev commented Aug 3, 2016

Hi,
In file src/Atm_button.cpp, the lib will detect the original status of a button, and use the reverse value as the status of pressed button, so the user won't need to specify the on/off status explicitly.

For the first patch of the file src/Atm_fade.cpp, the fade class is enhanced by a new API in which the user can specify the min/max value of the LED PWM, instead of using the fix 32 steps in the origin source code.

The second patch of the file src/Atm_fade.cpp is to solve the problem caused by that the lib only supports 1ms steps. The fade class would unable to change the LED value from 0 to 255 in a short time (i.e in 10ms). The patch will use millis() to check the time and set the correct value.

@tinkerspy tinkerspy mentioned this pull request Sep 26, 2016
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

Successfully merging this pull request may close these issues.

2 participants