We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
the example
if (myInput.pressedFor(500)) { // true (once only) if button has been pressed for 500ms }
does not seem to work. I get repeated output with this code in Wokwi
#include <Toggle.h> // https://github.com/Dlloydev/Toggle Toggle sw; const unsigned long longPressDelay = 3000ul; void setup() { Serial.begin(115200); sw.begin(3); Serial.println("READY"); } void loop() { sw.poll(); if (sw.pressedFor(longPressDelay)) Serial.println("LONG PRESS"); }
is that a wokwi issue ?
what code would let me check for both short and long press on a button? checking for onPress() will not work with pressedFor() apparently.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
the example
does not seem to work. I get repeated output with this code in Wokwi
is that a wokwi issue ?
what code would let me check for both short and long press on a button? checking for onPress() will not work with pressedFor() apparently.
The text was updated successfully, but these errors were encountered: