What cable do I need for Sparkpad?
Sparkpad requires a USB Micro B cable which must be capable of carrying data (not just a charging cable).
To get your Sparkpad up and running, use a USB Micro B cable to connect it to one of your PC/laptop's USB ports. Once Sparkpad is plugged into your computer, it will be recognised automatically as a HID device, so there is no need to install additional drivers.
To adjust the lighting of your Sparkpad, you can use the OLED and 3 menu buttons located in the bottom left. The middle menu button is the "select" button, and the left and right buttons let you cycle through the available options. The OLED menu is hidden by default to prevent "burn in"; to show it simply press the "select" button. The menu consists of two levels, and these are described below.
0 : Off
1 : Red
2 : Blue
3 : Green
4 : Pink
5 : Yellow
6 : Cyan
7 : White
Brightness : The global lighting brightness, with higher numbers being brighter.
Switch : Use this option to tailor lighting for individual keys. For example, to adjust lighting for the top right key, choose "2" for this option and proceed to the "Switch settings" menu below. Here is how the numbers and keys are related:
Switch settings : Selecting this option takes you to the second menu level, which lists lighting options for the selected key.
0 : Global
1 : Unique
Colour : The key lighting colour. If the lighting mode is "unique", this option selects the colour for this key. The colour assignments are the same as previously described.
Switch mode : The key switch mode. In "static" mode, pressing the key will not effect it's lighting. In "toggle" mode, pressing the key will turn it's lighting off, and pressing it again will switch it on. In "delay" mode, once the key is pressed the lighting will stay lit for a predetermined time set by the delay option. The assignments are as follows:
0 : Static
1 : Toggle
2 : Delay
Delay : The key delay setting. This option is only relevant if this key is in "delay" mode. You can choose any delay between 1 and 255 seconds.
Volume control knob
Cleaning your Sparkpad
To clean the surfaces of your Sparkpad case, you can use soapy water and a non abrasive scrubber such as a sponge or toothbrush. You can also use Isopropyl Alcohol (IPA), and this tends to a better job cleaning the engraved parts. If using soapy water, you should first remove the PCB from the case by undoing the 4 corner screws. With Isopropyl Alcohol you can leave the PCB in the case. You may find that white marks are left behind after cleaning; to remove these, rub the surfaces with clean white paper.
Do not use Acetone or other strong solvents, as these will dissolve the black paint on the top panel!
To develop custom firmware for your Sparkpad (or to update to newer firmware), there are 3 options available to you.
The easy way - Arduino IDE
You will first need to download and install the Arduino IDE, and import the Sparkpad library using the Arduino Library Manager:
When plugged in via USB, your Sparkpad will be visible to the Arduino IDE as a serial device on a particular port, and the port name will depend on which OS you are using (COM for Windows, dev/tty for Mac and Linux). The board type is Arduino Leonardo:
To upload the latest firmware version to your Sparkpad, simply choose Sparkpad -> Pro-Micro -> default from the examples menu and hit upload. If you are looking to customise the firmware, then keep reading!
The Arduino firmware is split into two components - the .ino file, and .h (or header) files.
This file - or 'sketch' in Arduino parlance - contains the core code which runs on the Sparkpad. You can break down this file into 3 parts. At the top are definitions and includes: definitions specify global parameters (such as mappings for the Sparkpad's 12 keys), and includes pull in resources from external files (such as the code for the OLED). Below these is the setup function which runs once when the Sparkpad boots up and initialises all the components. Finally the loop function is the code which runs continuously on the Sparkpad, and this is where all the good stuff happens! The .ino file also contains a few utility functions, which are just there for convenience and to avoid duplicate code.
If you are just looking to adjust key mappings or other global parameters on your Sparkpad, then you only have to make changes to the necessary definitions in the .ino file.
knob.h, leds.h and oled.h files
These files contain code specific to a particular Sparkpad component. These files have their own definitions and includes, and all the functions which define their behaviour. If you are looking to add bespoke functionality to your Sparkpad, then you will probably have to tweak one or more of these files.
The lightweight way - avrdude
If you don't want to look at the code and just want to upload firmware, you can use [this tool] (https://github.com/vanbwodonk/leonardoUploader). Once installed, you can download the .hex file you want from the "releases" section of this repo, and upload it straight to your Sparkpad using the command line.
The pro way - platformio
If you intend to make serious modifications to your Sparkpad firmware, then we recommend downloading VScode and installing the platformio plugin. This repo contains a platformio.ini file which allows you to open it inside VScode as a platformio project. Coding inside platformio lets you to take advantage of tools such as code completion and syntax checking, and gives you easy access to the .h files which are more hidden inside the Arduino IDE.
The only snag with using platformio is it does not recognise .ino files as source files, so you will have to change the .ino suffix to .cpp on the files you are working on. If you intend to push changes to the main Sparkpad branch, please remember to change these back to .ino before you push to maintain backwards compatibility with the Arduino IDE.
To further ensure backwards compatibility, when writing new and experimental code please create a new example within the examples folder, and add the example as an environment inside the platformio.ini file. Don't add your code to one of the default examples. If you feel the code you are writing deserves to be part of the default firmware, then please raise an issue in Github first.