-
-
Save bored-engineer/e5c9bc289963ab6cb9abf137113afa74 to your computer and use it in GitHub Desktop.
WebAuthn toggle automation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define totalPins 6 | |
int pins[totalPins] = {13, 12, 9, 8, 7, 6}; | |
void setup() { | |
// Ensure the PINs never output voltage HIGH (5v) or we may fry the keys | |
for (byte idx = 0; idx < totalPins; idx++) { | |
pinMode(pins[idx], OUTPUT); | |
digitalWrite(pins[idx], LOW); | |
pinMode(pins[idx], INPUT); | |
} | |
// Wait 5 seconds for the keys to boot so we don't confuse them | |
delay(5000); | |
} | |
void loop() { | |
// Toggle each key on/off iteratively, cannot trigger more than one key at a time | |
for (byte idx = 0; idx < totalPins; idx++) { | |
pinMode(pins[idx], OUTPUT); | |
delay(50); | |
pinMode(pins[idx], INPUT); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment