Programmable Mechanical Keyboard
Table of contents
I designed this programmable Keyboard due to my Quest to have a special keyboard which I could customize to play my Car Race game vBlur, its been awesome playing and firing mines ,using shield ,badging into water and other competing tools on vBlur , I noticed the main keys I used while I play games are less than 8 keys on my keyboard, which are (Q,W,A,S,<,> and shift) keys, so I searched and got it that Arduino pro Micro board which has the ATMEGA 32U4 controller on board can be used to make customized keyboard which will work fine as the normal keyboard. I checked out Official Documentation at the Arduino Site on keyboards, I found the instructions easy and implementable, it was then I got the Arduino Pro micro at a local store for about $14, I programmed it and it worked fine, I then decided to share for anyone who will also like to make his, I will share my schematics, you free to copy it, and also my PCB Pictures, but will only share the gerber on demand. So if you need the gerber you can mail me :adewumitoyyib@gmail.com Below is my code :
‘’’
#include
// use this option for OSX: //char ctrlKey = KEY_LEFT_GUI; // use this option for Windows and Linux: // char ctrlKey = KEY_LEFT_CTRL;
void setup() { // make pin 2 an input and turn on the // pullup resistor so it goes high unless // connected to ground: pinMode(2, INPUT_PULLUP); pinMode(3, INPUT_PULLUP); pinMode(4, INPUT_PULLUP); pinMode(5, INPUT_PULLUP); // initialize control over the keyboard: Keyboard.begin();
}
void loop() {
if (digitalRead(2) == LOW){ Keyboard.write('Q'); delay(500) ; }
if (digitalRead(3) == LOW){
Keyboard.write('A');
delay(500);
}
if (digitalRead(4) == LOW){
Keyboard.write('Q');
delay(500) ;
}
if (digitalRead(5) == LOW){
Keyboard.write('A');
delay(500);
}
}
NB: the components can be seen on the schematics.
Subscribe to my newsletter
Read articles from ADEWUMI Toyyib directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by