Remap Inputs on ShakeUp
Learn how to change inputs on the ShakeUp
Written By: Cherie Tan
The ShakeUp comes programmed with inputs that emulates some keys on a keyboard as well as a mouse.
But did you know that you can also change its inputs? In this guide, you will learn how remap the ShakeUp's inputs by editing an Arduino sketch.
Complete this guide to turn your ShakeUp into a custom game controller!
Step 1 Open up the example sketch
Over in the Arduino IDE, you'll find an example sketch called 'Factory'. It can be found under File > Examples > Examples for Little Bird ShakeUp > Shakey > Factory
This is the sketch that is already programmed to the ShakeUp out of the box. If you run into any errors, it can be re-uploaded to the ShakeUp. It can also be used to change the input keys to your liking.
Step 2 Create a new Arduino sketch
To keep the factory sketch as is, create a new Arduino sketch.
Then copy and paste the factory sketch into the new sketch file.
Copy 'settings.h' and paste it into a new sketch as well. Make sure its extension is '.h' and not '.ino'!
Step 3 Place new settings.h file into same directory
For the code to work, the new 'settings.h' file needs to be in the same directory as the new sketch file. So place it in the same directory as shown.
Step 4 Change the input keys
In this new sketch, the inputs for up, down, left and right are kept the same. Four inputs on the right hand side of the ShakeUp have been changed to 'z', 'x', 'c' and the return key, 'KEY_RETURN'.
For a full list of key codes, scroll down to the bottom of the sketch. They should be in grey, this means they are comments.
Step 5 Change noise cancellation values
You might also want to change the values for 'SWITCH_THRESHOLD_OFFSET_PERC' and 'SWITCH_THRESHOLD_CENTER_BIAS'
Changing these changes how hard it is to 'press' and 'release' keys.
Step 6 Upload to the ShaKey
Save the new settings.h file, and re-upload the new ShakeUp sketch file, 'ShakeUp-remap.ino'.