MakerWorld
Electronics
Go to Model
WASD Keyboard
32
Downloads
14
Likes
11
Makes
This is my 3D printed WASD Keyboard. Parts needed: Arduino pro micro (only works with Arduino pro micro oder leonardo)4 Keyboard switchessome wire4 Keycaps (mine are from @misterryan) Wirering: [Switch W] ───── Pin 2 └──────── GND[Switch A] ───── Pin 3 └──────── GND[Switch S] ───── Pin 4 └──────── GND[Switch D] ───── Pin 5 └──────── GND Code: #include <Keyboard.h>const int wPin = 2;const int aPin = 3;const int sPin = 4;const int dPin = 5;void setup() { pinMode(wPin, INPUT_PULLUP); pinMode(aPin, INPUT_PULLUP); pinMode(sPin, INPUT_PULLUP); pinMode(dPin, INPUT_PULLUP); Keyboard.begin();}void loop() { // W if (!digitalRead(wPin)) Keyboard.press('w'); else Keyboard.release('w'); // A if (!digitalRead(aPin)) Keyboard.press('a'); else Keyboard.release('a'); // S if (!digitalRead(sPin)) Keyboard.press('s'); else Keyboard.release('s'); // D if (!digitalRead(dPin)) Keyboard.press('d'); else Keyboard.release('d');}
Did you print this model? Sign in and share your make!
Sign in to leave a comment
Sign inNo comments yet – be the first!