Files
soundcube-firmware/README.md

138 lines
3.2 KiB
Markdown
Raw Permalink Normal View History

2025-05-27 16:11:00 +02:00
# Soundcube Firmware
2025-05-27 17:18:20 +02:00
## Install new firmware
1. Go to [Releases](https://code.w4d.dev/W4D/soundcube-firmware/releases)
2. Download latest `soundcube-firmware.ino.uf2` file
3. On your Soundcube Board: Press and hold the outer most white button as seen from the USB-C socket
4. While holding the button press the inner most white button once
- the board will go into bootloader mode and appear as USB thumb drive
6. Copy the `soundcube-firmware.ino.uf2` file to the thumb drive and wait for the board to restart
2025-06-17 12:10:54 +02:00
## SD Card contents
2025-06-17 12:20:52 +02:00
```
2025-06-17 12:10:54 +02:00
config.txt
sound/
├─ 1.wav
├─ 2.wav
├─ 3.wav
├─ 4.wav
├─ 5.wav
├─ 6.wav
├─ 7.wav
├─ 8.wav
2025-06-17 16:29:03 +02:00
ui/
├─ click.wav
├─ beep.wav
2025-06-17 12:10:54 +02:00
2025-06-17 12:20:52 +02:00
```
2025-06-17 12:10:54 +02:00
### config.txt
2025-05-27 19:45:00 +02:00
Json formatted config file. For now only edge led color working.
```
{
"boxid":"",
2025-05-27 19:45:00 +02:00
"edge": {
"color":{
"idle":{
"r":50,
"g":0,
"b":50
},
"active":{
"r":0,
"g":50,
"b":50
}
}
},
"ring": {
"color":{
"idle":{
"r":0,
"g":50,
"b":50
},
"active":{
"r":0,
"g":80,
"b":50
}
2025-05-27 19:45:00 +02:00
}
}
}
```
2025-06-17 16:29:03 +02:00
## Sound
2025-05-27 19:45:00 +02:00
2025-06-17 16:29:03 +02:00
### UI
2025-05-27 19:45:00 +02:00
2025-06-17 16:29:03 +02:00
There are two UI sounds - `click.wav` and `beep.wav`.
2025-05-27 19:45:00 +02:00
2025-06-17 16:29:03 +02:00
- `click.wav` is played when a button is pressed other than the select button
- `beep.wav` is played when the rotary encoder select button is pressed
Put these files in the subfolder `ui` on the SD card.
#### Wave File Format for UI Sounds
`click.wav` needs to be **22050Hz (22kHz) 16bit Mono**
### Audio Out or Speakers
2025-06-17 12:10:54 +02:00
2025-06-17 12:20:52 +02:00
Put all sounds into the `/sound` subfolder. Name them `1.wav, 2.wav, 3.wav...`
2025-06-17 12:10:54 +02:00
2025-06-17 16:29:03 +02:00
#### Wave File Format for Audio Out and Speakers
2025-06-17 12:10:54 +02:00
2025-06-17 16:29:03 +02:00
Export all sounds as **48000Hz (48kHz) 16bit Stereo**.
2025-06-17 12:10:54 +02:00
2025-06-17 12:10:54 +02:00
### Audacity
You can use Audacity to export all soundfiles to WAV format.
Download it here [Github](https://github.com/audacity/audacity/releases)
2025-06-17 12:10:54 +02:00
1. Load file into Audacity
2. Select Track
3. File -> Export Audio
#### Format options in Audacity
2025-06-17 16:29:03 +02:00
**Audio Out**
2025-06-17 12:10:54 +02:00
- WAV(Microsoft)
- Chanels: Stereo
- Samplerate: 48000Hz
- Encoding: Signed 16-bit PCM
2025-06-17 16:29:03 +02:00
**UI**
- WAV(Microsoft)
- Channels: Mono
- Samplerate: 22050Hz
- Encoding: Signed 16-bit PCM
2025-06-17 12:10:54 +02:00
----
2025-05-27 16:11:00 +02:00
## Code something yourself
1. Download [Arduino IDE](https://www.arduino.cc/en/software/)
2. Install and open "Preferences"
3. Follow these [instructions](https://github.com/earlephilhower/arduino-pico?tab=readme-ov-file#installation)
2025-05-27 16:13:36 +02:00
- No need to change checkboxes, only paste the URL and hit OK.
4. Install **Raspberry Pi Pico** boards ([HowTo install boards](https://support.arduino.cc/hc/en-us/articles/360016119519-Add-boards-to-Arduino-IDE))
2025-05-27 16:18:33 +02:00
5. Install libraries ([HowTo install libraries](https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-installing-a-library/)): Adafruit Neopixel, AS5600 (Rob Tillaart), TCA9555 (Rob Tillaart)
6. Choose **Generic RP2350** as board and the correct port (Mac: /dev/cu.usbmodemXXXX, PC: COMXX Serial Port)
2025-05-27 16:11:00 +02:00
7. Go to **Tools -> Flash Size** and choose **16MB (no FS)**
8. Make your changes in the code
9. Hit Upload Button (Arduino IDE compiles and uploads it automatically)
2025-05-27 16:11:00 +02:00