Osu! Keyboard: Step 1: Materials and Explanations
Osu! Keyboard: Step 1: Materials and Explanations
Osu! Keyboard
by Thomazzz3
I recently started playing a rhythm game called osu! Note 1: SMD components (small electronics) are used
and after seeing a video of a commercial mini so if you replicate this project soldering skills are
keyboard I thought it would be a fun project to required. maybe an easy to solder version will be
design one myself. Not long after that I decided it added but these leds don't come in trough hole
would be a good idea to put it on instructables as my package
rst project.
Note 2: I have updated the code multiple times and im
If you want to replicate this project exactly to the last up to version 3ish now. I'll leave all code online but I
instruction then be my guest, but some of the recommend you use the last version. It currently
desicions I made are not based on lowest price or best doesn't have led functionality but it should be the
quality. Some components are chosen almost purely best performing one.
because i had them lying around. If you can handle it I
would encourege you to customize your project.
PCB. T he s w it che s
1 Arduino pro micro + USB cable There are many mechanical switches you can use.
Linear, tactile or clicky from Kailh or Cherry MX.
3 Kailh BOX red switches Choose whichever you like. I used the Kailh switches
because they were cheap on Ailexpress. If you choose
3 10k resistor (0805 SMD) to use the PCB you'll need Kailh BOX switches. The
colour determines the feeling.
3 100nF capacitor (0805 SMD)
T he e le ct ro nic co m po ne nt s
4 APA102 rgb LED (5050 SMD)
Not much to explain about them in this chapter, but if
3 Keycaps you dont use the PCB I would recomend just normal
trough hole components for soldering ease.
1 Printed circuit board (PCB) provided in this project Unfortunately the leds used are not available in
trough hole packages. I would also not recommend to
1 3D printed case provided in this project use wires on SMD packages unless you are Very
con dent in your soldering skills. Even for SMD on a
W hy do I us e a n Arduino pro m icro ? PCB "advanced" soldering skills are equired.
Download
https://www.instructables.com/ORIG/FW1/QS3P/JKSZSJ7C/FW1QS3PJKSZSJ7C.zip
5. Place the assembled coverplate in the 3D printed uploading your code. The leds are nice to have if your
case and secure with tape or use bolts if they dont code doesn't upload but are not nice to look at as a
interfere with the keycaps. nished product. Skill and pointed tweezers are
required.
6. Place the keyCaps on the switches and you're done.
Also some grip feet on the bottom are nice for anti
Re co m e nda t io ns slip and let the rgb light shine through.
https://www.instructables.com/ORIG/FMO/DK0R/JKSZSIOP/FMODK0RJKSZSIOP.stl
View in 3D Download
https://www.instructables.com/ORIG/F2B/3AHZ/JKSZSIOQ/F2B3AHZJKSZSIOQ.stl
The code for this project is not beginner friendly so if Keyboard.begin() simply starts the usb connection as
you are just beginning to program in arduino then keyboard.
this code will possibly scare you a bit. However i'll try
to explain what's going on as best as i can. Some Next 3 interrupts are are linked to the switch pins.
things are explained later on in this tex so if you have Every time a change is detected on the switch pin a
questions please rst read the whole thing. tiny program will be executed. This little program will
be made further on.
Uplo a ding t he co de
Lo o p
First download all 3 ".ino" les and put them in one
folder. If you don't have the Arduino IDE just This part will continuously repeat while the arduino is
download it for free on the o cial arduino site. powered.
https://www.arduino.cc/en/Main/Software
I only use it to change and update the color of the
Connect your Arduino to your PC and open LEDs.
"OSU_Keyboard_code_V1.ino". In Tools --> Board select
"Arduino/Genuino Micro". Also in Tools select the right Int e rrupt s
COM port. This can sometimes change.To upload the
code to your Arduino just click on the arrow on the Here the little programs, which will only be executed
when a change is detected on the switch pins, are
Osu! Keyboard: Page 7
when a change is detected on the switch pins, are
top left of the screen and wait until it tells you it
made. They are identical except for which pin they
completed in the bottom left.
react to.
O S U_ Ke y bo a rd_co de _ V1
First it checks if the button is pressed or released and
sends the correct keyboard command.
Including a nd de ning
The next 3 bytes are for the blue, green and red
values. One byte for each color.
Co lo rW he e lT his Le d
St a rt End Fra m e
Download
https://www.instructables.com/ORIG/FZ8/MM1V/JKSZSFDV/FZ8MM1VJKSZSFDV.ino
Download
https://www.instructables.com/ORIG/F7F/1AXS/JKSZSF8J/F7F1AXSJKSZSF8J.ino
Download
https://www.instructables.com/ORIG/FUJ/QYMG/JKSZSF8N/FUJQYMGJKSZSF8N.ino
Download
https://www.instructables.com/ORIG/FL7/B6LF/JM0V7IW7/FL7B6LFJM0V7IW7.ino
Download
https://www.instructables.com/ORIG/FMG/6SVU/JM0V7IW9/FMG6SVUJM0V7IW9.ino
Download
https://www.instructables.com/ORIG/F5E/SU0M/JM0V7IWA/F5ESU0MJM0V7IWA.ino
Download
https://www.instructables.com/ORIG/FJ4/0V04/JM0V7IWM/FJ40V04JM0V7IWM.ino
Download
https://www.instructables.com/ORIG/FOS/PT9O/JM0V7IWP/FOSPT9OJM0V7IWP.ino
Step 7: The Code V3 (software Debounce With Vertical Counter) (recommended)(no LED)
Download
https://www.instructables.com/ORIG/FQ6/Z19K/K39CBSWK/FQ6Z19KK39CBSWK.rar
Download
https://www.instructables.com/ORIG/FY6/M7Y7/KB52XJQD/FY6M7Y7KB52XJQD.ino
If everything went well you should now have a working keyboard to play Osu! on. I personally havn't noticed any
latency at all. If you do please let me know. Also if there are any questions feel free to ask anything.
The previous mentions about a V2 are not meant as a promise so don't postpone this project because you want to
wait for V2.
If you think you are having troubles with your keyboard, rst open a text editor and press each key once for a short
time.
It is possible you destroyed a switch internally while soldering. If you have a multimeter put it on
continuity/beeping, put it parallel to the switch while the Arduino is not connected and press the key. It should
beep.
Do the characters you just typed match the keys you con gured in Osu! ?
Change the characters in the arduino code in the rst 3 #De nes ( ' ' is nessecary!).
The debounce circuit propably doesn't work for your switches or is not correctly soldered. Check your solder
connections. If it still occurs try a capacitor value of 1uF. This will be very hard for the PCB users.
A solder connection may be loose. If you use the PCB con rm the soldering tin realy owed on the pad on the print.
Do none of the leds work or from a certain number of LEDs stops working?
Check for shorts between the conections of the rst LED (follow tracks) and check for well connected tin on the
outputs of the Arduino and again the rst LED. If con rmed correct and still defect you may need to replace the
rst LED.
https://youtu.be/hJIpuX31pac
hello to you i'm still a beginner can you help me on this one ireally want to make it idont want any
led i just want the buttons how do i do it?
Hi do you have a diagram without PCB? or PCB is needed to do this one? Thanks!
The schematic can be found in step 2. The PCB is a 'nice to have' and is not necessary
So how can I do that without PCB? Just need wires to connect them?
In Step 7 I added code that uses the internal pull-up resistors. You can use that one
Good day! Can you share a good place to acquire keycaps for the Kaihl switches? I got the kaihl
copper. Also I would like to know, if it is necessary to add any diodes to the build. Thank you.
For the keycaps any MX compatible caps should do it i think. I got mine from AliExpress but I
wouldn't call it a "good place". I was more fucused on low price.
https://s.click.aliexpress.com/e/WZq0KN6
As for the diodes it is not clear to me where in the circuit you would need them and for what
purpose. For that I need some more information.
Love the debounce explanation and simulator. Why RGB (are they controlled by the game or
keystrokes or just for fun)?
Thanks =)