First you will need the Arduino IDE. This project was compiled using version 2.3.3. Future revisions (2.x.x) should be fine, but behaviour may change for major revisions.
The firware has the following library dependecies.
The MIDI functionality is currently provided through Arduino Nano 33 BLE mbed PluggableUSBMIDI.h header.
These dependencies can be installed manually or through the arduino-cli.
If you are using homebrew on macOS, in your Terminal type:
brew install arduino-cliOtherwise, follow the alternative install instructions.
After installation, you can copy and paste the following into your terminal:
arduino-cli lib install "Rotary"
arduino-cli lib install "Button2"
arduino-cli lib install "Adafruit FRAM SPI"
arduino-cli lib install "Adafruit NeoPixel"
arduino-cli core install arduino:mbed_nanoOpen the firmware and verify it works. Please flag an issue if you come across any errors.
All firmware in src/ directory which consists of
src/haptic_harpsichord/: main firmware for the 49-key modelsrc/prototyping/: firmware used through the prototyping processsrc/tests/: component functionaliy and diagnostics tests
Note
The prototyping/ directory contains source created during the prototyping process and is still largely unorganised. All functionality and logic is largely the same as the main haptic_harpischord/ code, though there may be the odd hard-coded variable or subtle change in behaviour. As such it is kept here for reference.
The firmware uses the connected FRAM to read and write threshold values as well as set which jack register is being used. Use the src/tests/fram_debug project to interact with the FRAM directly and set the values
- Single Threshold
- Hysteretic Pluck Threshold
- Hysteretic Release Threshold
- Jack Register
The firmware will check that all memory areas have been initialised. If you they have, a report of the values will be printed over the serial connection. If any memory area has not been initilaised a prompt will appear over the serial connetion. Send options and commands over a serial connections. You can use the Arduino IDE's Serial Monitor to achieve this.
This is the full firmware for the haptic harpsochord using the Arduino IDE.
Firmware was written around use of an Arduino Nano 33 BLE with some accomodation for an ESP32.
- QRE1113
- 10 kΩ Potentiometer
- MB85RS64 SPI Non-Volatile FRAM
- Rotary Encoder w/ tactile switch
- CD4051BE multiplexer
- WS2812B RGB LEDs
| Connection | Pin Left | Pin Right | Connection |
|---|---|---|---|
| EEPROM SPI CLK | D13 | D12 | Rotary CLK |
| EEPROM VCC | 3.3v | D11 | Rotary DATA |
| NC | AREF | D10 | Rotary Switch |
| PCB 0 | A0 | D9 | LED Data |
| PCB 1 | A1 | D8 | Mux C |
| PCB 2 | A2 | D7 | Mux B |
| PCB 3 | A3 | D6 | Mux A |
| PCB 4 | A4 | D5 | Mux Interrupt |
| PCB 5 | A5 | D4 | EEPROM SPI MISO |
| PCB 6 | A6 | D3 | EEPROM SPI MOSI |
| NC | A7 | D2 | EEPROM SPI CS |
| NC | 5v | GND | GND |
| NC | RESET | RST | Reset Switch |
| GND | GND | RX / D1 | NC |
PSU + |
VIN | TX / D0 | NC |
NC: Not Connected