#include "Adafruit_NeoKey_1x4.h" #include "seesaw_neopixel.h" #include Adafruit_NeoKey_1x4 neokey; void setup() { Keyboard.begin(); if (! neokey.begin(0x30)) { Serial.println("No peripheral detected."); while(1) delay(10); } } void loop() { uint8_t buttons = neokey.read(); if (buttons & (1<<3)) { Keyboard.press(KEY_HOME); } else { Keyboard.release(KEY_HOME); } if (buttons & (1<<2)) { Keyboard.press(KEY_PAGE_UP); } else { Keyboard.release(KEY_PAGE_UP); } if (buttons & (1<<1)) { Keyboard.press(KEY_PAGE_DOWN); } else { Keyboard.release(KEY_PAGE_DOWN); } if (buttons & (1<<0)) { Keyboard.press(KEY_END); } else { Keyboard.release(KEY_END); } }