Initial public release of WII5 Buoy firmware

Firmware for an autonomous wave-measurement buoy (ATmega2560-based
WII5 v2 board). Reads wave motion from a Sparton AHRS-M1/M2 IMU,
samples GPS and battery state, and reports back over Iridium SBD
satellite telemetry. Originally developed 2012-2024.

This is the first public release. Code, documentation, and field-tested
operating modes (Capture, Sleep, Position, ManualTest, SelfTest,
LowBattery) are licensed under Apache 2.0 — see LICENSE and NOTICE.

See README.md for an overview and build instructions, CONTRIBUTING.md
for how to contribute, and DEPLOYMENTS.md for the field-deployment log.
This commit is contained in:
2026-05-07 16:00:21 +10:00
commit 295abb37ee
122 changed files with 38142 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2012-2024 Scott Penrose <scottp@dd.com.au> and WII5 Buoy contributors
#
# This file is part of WII5 Buoy firmware.
# See LICENSE for full terms.
# Burn LED-flash test sketch + bootloader for the 11.0592 MHz board variant.
# See http://eleccelerator.com/fusecalc/fusecalc.php?chip=atmega2560
# lfuse 0xff - external oscillator
# hfuse 0xd8
# efuse 0xfd - BOD Level 1 = 2.7V
: "${WII5_AVRDUDE:=avrdude}"
CONFIGFILE=./avrdude.conf
BOOT_HEX=./optiboot_flash_atmega2560_UART0_230400_11059200L_BIGBOOT.hex
"$WII5_AVRDUDE" \
-C"$CONFIGFILE" -v \
-v \
-patmega2560 \
-cstk500v2 \
-Pusb \
-Uflash:w:ledflash_11mhz.ino.hex:i \
-Uboot:w:"$BOOT_HEX":i \
-Ulock:w:0
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2012-2024 Scott Penrose <scottp@dd.com.au> and WII5 Buoy contributors
#
# This file is part of WII5 Buoy firmware.
# See LICENSE for full terms.
# Burn LED-flash test sketch + bootloader for the 16 MHz board variant.
# See http://eleccelerator.com/fusecalc/fusecalc.php?chip=atmega2560
# lfuse 0xff - external oscillator
# hfuse 0xd8
# efuse 0xfd - BOD Level 1 = 2.7V
: "${WII5_AVRDUDE:=avrdude}"
CONFIGFILE=./avrdude.conf
BOOT_HEX=./optiboot_flash_atmega2560_UART0_230400_11059200L_BIGBOOT.hex
"$WII5_AVRDUDE" \
-C"$CONFIGFILE" -v \
-v \
-patmega2560 \
-cstk500v2 \
-Pusb \
-Uflash:w:ledflash_16mhz.ino.hex:i \
-Uboot:w:"$BOOT_HEX":i \
-Ulock:w:0
Binary file not shown.
File diff suppressed because it is too large Load Diff
+18
View File
@@ -0,0 +1,18 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2012-2024 Scott Penrose <scottp@dd.com.au> and WII5 Buoy contributors
#
# This file is part of WII5 Buoy firmware.
# See LICENSE for full terms.
# Burn only the bootloader via ICSP (no application).
: "${WII5_AVRDUDE:=avrdude}"
"$WII5_AVRDUDE" \
-C./avrdude.conf \
-v \
-patmega2560 \
-cstk500v2 \
-Pusb \
-Ulock:w:0x0F:m \
-Uflash:w:optiboot_flash_atmega2560_UART0_230400_11059200L_BIGBOOT.hex
+7
View File
@@ -0,0 +1,7 @@
# Reference snippet (not directly executable): the avrdude command for
# burning the stk500v2 mega2560 bootloader. Use parameterized scripts in this
# directory instead.
#
# avrdude -C <avrdude.conf> -v -patmega2560 -cstk500v2 -Pusb \
# -Uflash:w:<path to stk500boot_v2_mega2560.hex>:i \
# -Ulock:w:0x0F:m
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2012-2024 Scott Penrose <scottp@dd.com.au> and WII5 Buoy contributors
#
# This file is part of WII5 Buoy firmware.
# See LICENSE for full terms.
# Verify the WII5 sketch with the local Arduino IDE, then rsync the resulting
# .hex to a remote build host.
# Usage: upload.sh <remote-host>
# - the remote-side ssh user is taken from $WII5_REMOTE_USER (default: wii)
# - the local Arduino build dir is ~/Arduino/build by default; override with
# $WII5_BUILD_DIR.
: "${WII5_REMOTE_USER:=wii}"
: "${WII5_BUILD_DIR:=$HOME/Arduino/build}"
: "${WII5_ARDUINO_BIN:=arduino}"
set -e
REMOTE=$1
[ -z "$REMOTE" ] && { echo "Usage: $0 <remote-host>"; exit 1; }
rm -f "$WII5_BUILD_DIR/wii5_buoy.ino.hex"
"$WII5_ARDUINO_BIN" --verify app/wii5_buoy/wii5_buoy.ino \
--board WII:5.1.0:wii5_v2_2560_3V:cpu=atmega25603V3_11MHz230400 -v
rsync -av "$WII5_BUILD_DIR/wii5_buoy.ino.hex" "$WII5_REMOTE_USER@$REMOTE:~/"
+27
View File
@@ -0,0 +1,27 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2012-2024 Scott Penrose <scottp@dd.com.au> and WII5 Buoy contributors
#
# This file is part of WII5 Buoy firmware.
# See LICENSE for full terms.
# Burn WII5 application + bootloader via ICSP.
# See http://eleccelerator.com/fusecalc/fusecalc.php?chip=atmega2560
# lfuse 0xff - external oscillator
# hfuse 0xd8
# efuse 0xfd - BOD Level 1 = 2.7V
: "${WII5_AVRDUDE:=avrdude}"
FULL_HEX=wii5_buoy_latest.hex
CONFIGFILE=./avrdude.conf
BOOT_HEX=optiboot_flash_atmega2560_UART0_230400_11059200L_BIGBOOT.hex
"$WII5_AVRDUDE" \
-C"$CONFIGFILE" -v \
-v \
-patmega2560 \
-cstk500v2 \
-Pusb \
-Uflash:w:"$FULL_HEX":i \
-Uboot:w:"$BOOT_HEX":i \
-Ulock:w:0