Our idea is to emulate the keys of a keyboard from buttons that are controlled by arduino. Problem is that it writing wtihout any input and deletes the codes. Here is the code:
#include <Keyboard.h>
#include <Mouse.h>
void setup() {
Keyboard.begin();
pinMode(8, INPUT);
pinMode(7, INPUT);
pinMode(6, INPUT);
Mouse.begin();
}
void loop() {
if (digitalRead(8) == HIGH) {
Keyboard.press('w');
Keyboard.releaseAll();
delay(10);
}
if (digitalRead(7) ==HIGH ) {
Keyboard.press('s');
Keyboard.releaseAll();
delay(10);
}
if (digitalRead(6) == HIGH) {
Mouse.click();
delay(10);
}
}
We have also 3D printed the first prototype of our gun, which will store all of the buttons.

Doesn't look good but we have v2 on the way because the upperpart was too small
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.