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

missing debounce for rx pin #4

Open
f2knpw opened this issue Aug 23, 2020 · 0 comments
Open

missing debounce for rx pin #4

f2knpw opened this issue Aug 23, 2020 · 0 comments

Comments

@f2knpw
Copy link

f2knpw commented Aug 23, 2020

Hi
Nice library.
However decoder is not working properly when inout is noisy
I have added a debounce in checkIncoming routine

void Lewis::checkIncoming()
{
  uint32_t current_time = millis();
  static uint8_t current_state;
  static float average = 0.;
   
  average = 0.01*digitalRead(_rx_pin) + 0.99*average;
  current_state = floor(average +.5);
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants