Okaerinasai minna!
UPDATE August 12, 2018: The newer guide has now been posted in my Github page as a doc file. I will keep the old guide here until I figure out how to format the newer guide into BBcode. Enjoy everyone
I would also like to clarify that this thread's official support system is only in English. Those who understand other languages as well as English are encouraged to contact me through PM to relay other issues posted here in different languages. I do not think I can satisfactorily help you very well even with Google Translate. I might try, but GT has inconsistent luck with different languages.
UPDATE June 21, 2018: When posting your code in the threads, please use the [/code] format to properly format your code. It'd be nice code in its full, monospaced glory. Otherwise, carry on below
WELCOME EVERYONE !!!
Seriously, if you find yourself frustrated with the osu! keyboards going out of stock here's a guide on how to build your own controller. Keep in mind that this thread does not go into specific designs in order to keep this thread flexible for other gamemodes. (Mania controller, Taiko, etc.)
Also post your builds here if you'd like. It'd be nice to see what the maker community in osu! can come up with.
A shopping list to consider:
-HAVE FUN!!
Feel free to go nuts with your design. Sorry the tutorial took forever to post
Some words from Thnikk himself:
FUTURE PROJECTS
-Hardware switch debouncer
-Interrupt-based actuation Too hard
-Underglow LEDs
- Sanwa build FINALLY DONE
Credits:
- Thnikk - code help
- PJRC - Teensy documentation
- Unnamed room in my university campus
- A handful of people in said room - 3D printing and modeling help
[/box]
UPDATE August 12, 2018: The newer guide has now been posted in my Github page as a doc file. I will keep the old guide here until I figure out how to format the newer guide into BBcode. Enjoy everyone
I would also like to clarify that this thread's official support system is only in English. Those who understand other languages as well as English are encouraged to contact me through PM to relay other issues posted here in different languages. I do not think I can satisfactorily help you very well even with Google Translate. I might try, but GT has inconsistent luck with different languages.
UPDATE June 21, 2018: When posting your code in the threads, please use the [/code] format to properly format your code. It'd be nice code in its full, monospaced glory. Otherwise, carry on below
WELCOME EVERYONE !!!
Seriously, if you find yourself frustrated with the osu! keyboards going out of stock here's a guide on how to build your own controller. Keep in mind that this thread does not go into specific designs in order to keep this thread flexible for other gamemodes. (Mania controller, Taiko, etc.)
Also post your builds here if you'd like. It'd be nice to see what the maker community in osu! can come up with.
A shopping list to consider:
Electronics - the heart of any osu! keyboard build
- Teensy 3.1, 3.2, LC, etc... or Arduino-based stuff like the Micro, Trinket, Due, Leonardo, etc...
- 4 x Cherry MX switch of choice (salvaged or new) (Get plate-mount if mounting via the plate; use PCB mount if your case is thick)
- 4 x Cherry MX key caps of choice (salvaged or new)
- 24-30 AWG wire
- Solder
- Soldering Iron
- Arduino IDE w/ Teensy Bootloader
- LEDs (Optional)
- 4 x Cherry MX switch of choice (salvaged or new) (Get plate-mount if mounting via the plate; use PCB mount if your case is thick)
- 4 x Cherry MX key caps of choice (salvaged or new)
- 24-30 AWG wire
- Solder
- Soldering Iron
- Arduino IDE w/ Teensy Bootloader
- LEDs (Optional)
Case - it matters not how you do it, as long as it holds the goods properly
The way of the 3D printer
- 3D printer (or get it printed somewhere)
- Nuts and bolts of choice (I used M5 nuts and bolts)
- Sketchup (or Blender; any 3D modelling program of choice)
- Filament of choice
The way of the laser or CNC cutting
- AutoCAD or Solidworks -> basically anything that can generate a g-code compatible file.
- Sheet metal or acryclic (1.5mm for metal, 2mm - 2.5mm acrylic)
- A shop that can cut for you or access to a cutting machine.
The way of the ghetto
- Some sheet acrylic or metal (or tupperware)
- A dremel
The way of the 3D printer
- 3D printer (or get it printed somewhere)
- Nuts and bolts of choice (I used M5 nuts and bolts)
- Sketchup (or Blender; any 3D modelling program of choice)
- Filament of choice
The way of the laser or CNC cutting
- AutoCAD or Solidworks -> basically anything that can generate a g-code compatible file.
- Sheet metal or acryclic (1.5mm for metal, 2mm - 2.5mm acrylic)
- A shop that can cut for you or access to a cutting machine.
The way of the ghetto
- Some sheet acrylic or metal (or tupperware)
- A dremel
Some design tips
THE CASE
- To plate mount a Cherry MX switch, you must cut 14mm x 14mm squares each. A standard keycap (non-modifier) is 18mm x 18mm. You must space them accordingly in design and in fabrication. Data sheets for Cherry MX are online. Model your case based on that
- Make sure your plate isn't more than 2mm thick with plate-mounted switches; you will run into switch problems. Use PCB mounted switches with thick cases, preferably with hot glue.
- Plan a resonable size that will fit both microcontroller and the switches. If possible, do not mount microcontroller beneath switches, lest you want massive kinking like mine does
- Make sure the Micro-USB port is accessible. Unless you design the KB with a non-removable cable: in which case, plan enough space for that extra bit of cable.
-- When using a 3D printer, remember the slicing software needs a compatible file, so do some research on the printer you're using and export accordingly. Same applies to CNC/laser cutters.
THE CASE
- To plate mount a Cherry MX switch, you must cut 14mm x 14mm squares each. A standard keycap (non-modifier) is 18mm x 18mm. You must space them accordingly in design and in fabrication. Data sheets for Cherry MX are online. Model your case based on that
- Make sure your plate isn't more than 2mm thick with plate-mounted switches; you will run into switch problems. Use PCB mounted switches with thick cases, preferably with hot glue.
- Plan a resonable size that will fit both microcontroller and the switches. If possible, do not mount microcontroller beneath switches, lest you want massive kinking like mine does
- Make sure the Micro-USB port is accessible. Unless you design the KB with a non-removable cable: in which case, plan enough space for that extra bit of cable.
-- When using a 3D printer, remember the slicing software needs a compatible file, so do some research on the printer you're using and export accordingly. Same applies to CNC/laser cutters.
Electronics
- Only the inputs need to be wired in parallel. Ground can all be wired in series as they all lead to the same ground pin.
- Adding LEDs? Find 3mm flange less LEDs. Remember that (for a brand-new LED) the longer wire is generally positive and cannot be wired the other way.
- Be extremely careful of soldering. Unless yours is outfitted with headers or a breakout board, the dangers of frying your chip is high.
- Only the inputs need to be wired in parallel. Ground can all be wired in series as they all lead to the same ground pin.
- Adding LEDs? Find 3mm flange less LEDs. Remember that (for a brand-new LED) the longer wire is generally positive and cannot be wired the other way.
- Be extremely careful of soldering. Unless yours is outfitted with headers or a breakout board, the dangers of frying your chip is high.
Coding/Extras
- Keyboard libraries are on github and Teensy website. Find those
- Don't bind two keys to the same keyboard button. Osu! locks up any key being pressed at the moment
- Keyboard libraries are on github and Teensy website. Find those
- Don't bind two keys to the same keyboard button. Osu! locks up any key being pressed at the moment
-HAVE FUN!!
Example Wiring Diagram
I hope you know pullup resistor configurations. Google is you friend if you don't.
External resistors only if your microcontroller doesn't have internal resistors.
External resistors only if your microcontroller doesn't have internal resistors.
Example Code for the Teensy controller, mind that you will have to experiment a bit.
Mind you that pullup function only works with resistors built into the controller. Otherwise, using external resistors, use:
For adding more buttons:
#include <Bounce.h> // this is needed to use the bounce library
#define KEYP_1 KEY_Z // here we are making it easier to change the key bindings later
// button pins
const int key_1 = 0; // input pin for your keyswitch; not necessary but helpful for doing other things like LED effects
Bounce button1 = Bounce(0, 8); // first number is pin number and second number is debounce time
void setup() {
pinMode(key_1, INPUT_PULLUP); // here we are telling the teensy what pin 0 is being used for
}
void loop() {
button1.update(); // this is reqired for your code to actually send the keypress to the computer
if (button1.fallingEdge()) { // fallingEdge is when the key is pressed
Keyboard.press(KEYP_1);
}
if (button1.risingEdge()) { // risingEdge is when the key is not pressed
Keyboard.release(KEYP_1);
}
}
Mind you that pullup function only works with resistors built into the controller. Otherwise, using external resistors, use:
pinMode(key_1, INPUT);
For adding more buttons:
#define <KEYP_X> <keycode> // keycode is the keycode for whatever you want the key to be
const int <key_X> = <pin> // pin is the pin your button is connected to
Bounce <buttonX> = Bounce(<Y>, 8); // Y is the pin number
pinMode(<key_X>, INPUT_PULLUP);
<buttonX>.update();
if (<buttonX>.fallingEdge()) {
Keyboard.press(<KEYP_X>);
}
if (<buttonX>.risingEdge()) {
Keyboard.release(<KEYP_X>);
}
Mine ended up like this
Sanwa build
New Build 12/29/2017
Sanwa build
New Build 12/29/2017
Feel free to go nuts with your design. Sorry the tutorial took forever to post
Some words from Thnikk himself:
Thnikk wrote:
If there's anything I'd add, it would be that the Teensy LC is still the best option of the Teensy series for its price and is still more than powerful enough, even if you wanted to add LEDs and do some fancy stuff. Also, the trinket is a nice option but harder to use for a 4-key since there's only 3 pins you can use for input while communicating with the computer, so you'd have to use some magic with resistors to get multiple buttons working on the same pin. They are great as a cheap controller for a 2-3 button keypad, though!
FUTURE PROJECTS
-
-
-
Credits:
- Thnikk - code help
- PJRC - Teensy documentation
- Unnamed room in my university campus
- A handful of people in said room - 3D printing and modeling help
[/box]