Skip to content

missing debounce for rx pin #4

@f2knpw

Description

@f2knpw

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);
  ...

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions