Thx to this guide i have managed to make my own osu keyboard.I wanted to thank you and here are some pictures of how mine turned out.
Also i have never wrote code for an arduino pro micro, but this is what i came up with.:
int buttonPin = 9;
int Pinbutton = 6;
#include <Keyboard.h>
void setup()
{
pinMode(buttonPin, INPUT);
digitalWrite(buttonPin, HIGH);
pinMode(Pinbutton, INPUT);
digitalWrite(Pinbutton, HIGH);
}
void loop()
{
if (digitalRead(buttonPin) == 0)
{
Keyboard.press('z');
delay(5);
}
if (digitalRead(buttonPin) == 1)
{
Keyboard.release('z');
}
if (digitalRead(Pinbutton) == 0)
{
Keyboard.press('x');
delay(5);
}
if (digitalRead(Pinbutton) == 1)
{
Keyboard.release('x');
}
}
It works just fine but if someone can edit it to make it better i would appreciate it.
THX FOR THE AWESOME GUIDE.
Also i have never wrote code for an arduino pro micro, but this is what i came up with.:
int buttonPin = 9;
int Pinbutton = 6;
#include <Keyboard.h>
void setup()
{
pinMode(buttonPin, INPUT);
digitalWrite(buttonPin, HIGH);
pinMode(Pinbutton, INPUT);
digitalWrite(Pinbutton, HIGH);
}
void loop()
{
if (digitalRead(buttonPin) == 0)
{
Keyboard.press('z');
delay(5);
}
if (digitalRead(buttonPin) == 1)
{
Keyboard.release('z');
}
if (digitalRead(Pinbutton) == 0)
{
Keyboard.press('x');
delay(5);
}
if (digitalRead(Pinbutton) == 1)
{
Keyboard.release('x');
}
}
It works just fine but if someone can edit it to make it better i would appreciate it.
THX FOR THE AWESOME GUIDE.