Skip to content

Instantly share code, notes, and snippets.

View IGx89's full-sized avatar

Matthew Lieder IGx89

View GitHub Profile
@Crenshinibon
Crenshinibon / gist:3915145
Created October 18, 2012 22:24
Basic keyboard polling
struct Key {
byte id;
boolean pressed;
uint8_t bounceKey;
Key(byte id) : id(id), pressed(false), bounceKey(NOT_BOUNCING) {};
}
boolean toggleKey(struct Key *key) {
key->bounceKey = checkStillBouncing(key->bounceKey);
if(key->bounceKey == NOT_BOUNCING){