Conversation
… 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 ))
|
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, |
|
Hi, 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. |
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.