# Contributing to WII5 Buoy Firmware
Thanks for your interest in contributing! This is firmware for an
Arduino/AVR-based wave-measurement buoy. Most contributors will be people
porting it to new hardware, fixing bugs found in the field, or adding sensor
support. The notes below are aimed at making PRs reviewable and avoiding the
classes of mistakes that have bitten us in the past.
## How to discuss before coding
For anything bigger than a typo or a small bug fix, **open an issue first**
to discuss the approach. Embedded firmware is full of subtle hardware
constraints (program-memory budget, real-time deadlines, ISR safety) and a
short up-front conversation usually saves a long review.
## Building locally
This is an Arduino IDE / `arduino-cli` project targeting the
ATmega2560 on a custom WII5 v2 board (see `WII5_board_v2.h`).
The build scripts in `tools/` are parameterized via env vars; copy
`tools/upload.sh` to `tools/upload.local.sh` (gitignored) and edit, or
export `WII5_BUILD_DIR`, `WII5_AVRDUDE_CONF`, `WII5_REMOTE`, etc. as needed.
See each script's preamble for the env vars it expects.
## Submitting changes
1. Fork the repository, create a topic branch off `main`.
2. Keep commits small and reviewable. One logical change per commit.
3. Use clear commit messages. The first line is a short summary
(`: