gokul/acoustic-guitar-tuner
This code defines the physical pin configuration and footprint layouts for the ATtiny1616 microcontroller and a matching tactile switch component, including their key hardware connection points, dimensions, and 3D models.
- Version
- 1.0.10
- License
- unset
- Stars
- 1
firmware/README.md
# Firmware build and programming
Validated toolchain: Arduino CLI 1.5.1, megaTinyCore 2.6.11. Install megaTinyCore using its official additional-board URL https://drazzy.com/package_drazzy.com_index.json.
```sh
arduino-cli compile \
--fqbn 'megaTinyCore:megaavr:atxy6:chip=1616,clock=10internal,bodvoltage=2v6,bodmode=enabled' \
--output-dir firmware-build \
firmware/acoustic_tuner_attiny1616
```
Compile size: 4,225 bytes flash, 522 bytes static RAM. The pitch algorithm also uses a 120-float local score buffer (480 bytes). Actual stack high-water mark and timing require hardware measurements.
Configure fuses using megaTinyCore's programmer workflow before uploading; preserve the UPDI pin function. Compiling a HEX file does not configure fuses. Use a 3.3 V-compatible UPDI programmer, not a plain USB-to-serial cable unless it is wired/configured as a supported SerialUPDI programmer.
Remove the battery. Connect male-ended programmer leads into the female J1 sockets: 1 UPDI, 2 regulated 3.3 V power, 3 ground. Never apply 5 V. Follow the programmer's instructions about target power; a voltage-sense pin alone does not power this board.
The host test in test_pitch.cpp checks mathematical tone detection, not an assembled guitar tuner. Calibrate SAMPLE_CLOCK_SCALE and test actual guitar harmonics, noise, capture timing, update latency, voltage and temperature. The nominal +/-4-cent LED window is not a verified accuracy specification.