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

Correct flush delay for 5 wiegand instances #15

Open
tripoyi opened this issue Jul 20, 2019 · 2 comments
Open

Correct flush delay for 5 wiegand instances #15

tripoyi opened this issue Jul 20, 2019 · 2 comments

Comments

@tripoyi
Copy link

tripoyi commented Jul 20, 2019

Hello Paulo... i love your wiegand library!
I've checked it with different brands and devices and works pretty well
I'm here to ask if you could recommend a flush delay for managing 5 wiegand instances, i'm working with pin change interrupts
my loop code is as follow:

void loop()
{
   noInterrupts();
  wg0.flush();
  wg1.flush();
  wg2.flush();
  wg3.flush();
  wg4.flush();
  interrupts();
  delay(100);
}
@paulo-raca
Copy link
Owner

Glad you like it!

The delay is just a placeholder for "other stuff" in your sketch -- feel free to skip it.

In fact, I have a WIP change (which I had completely forgot about) where setPinState tells you if/when to call flush, so that you could use some sort of scheduler instead of a fixed loop. I'll try to get that working soon :)

@tripoyi
Copy link
Author

tripoyi commented Jul 20, 2019

that would be great! and also would free a lot of code, but when I omit that delay the library will truncate the data and/or output errors. Also I don't run any other code in my loop

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