From 1eb2c5e5f9564141783cf259d3bf3e9ba5804dee Mon Sep 17 00:00:00 2001 From: Jon Froehlich Date: Thu, 25 Jun 2026 11:18:56 -0700 Subject: [PATCH 1/3] Fix stray '@' compile error in Button.hpp doc comment Inline /* */ block comments inside the /** */ Doxygen @code example prematurely closed the doc comment, turning the rest into stray code ("stray '@' in program"). Use // line comments inside @code instead. Co-Authored-By: Claude Opus 4.8 --- src/Button.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Button.hpp b/src/Button.hpp index 21e0e99..6a1d861 100644 --- a/src/Button.hpp +++ b/src/Button.hpp @@ -26,8 +26,8 @@ * * void loop() { * myButton.read(); - * if (myButton.isPressed()) { /* held down */ } - * if (myButton.wasPressed()) { /* just released */ } + * if (myButton.isPressed()) { } // held down + * if (myButton.wasPressed()) { } // just released * } * @endcode * From 56b8184a7ea461441ee58613baab583cc9dec48f Mon Sep 17 00:00:00 2001 From: Jon Froehlich Date: Thu, 25 Jun 2026 11:44:48 -0700 Subject: [PATCH 2/3] Align .hpp header footers with shared lab convention + add SPDX Replace the retired "@jonfroehlich / jonfroehlich.github.io" footer lines (per the canonical docs/sketch-header-template.md in the arduino repo) with the shared footer used across the lab's repos, and add an SPDX-License-Identifier so the MIT license travels with any single header a student copies out. Keep the Doxygen @author tag, and preserve the specific OLED lesson link as a "Learn more" line on the files that had it. Co-Authored-By: Claude Opus 4.8 --- src/Button.hpp | 9 ++++++--- src/ColorName.hpp | 9 ++++++--- src/FileUtils.hpp | 9 ++++++--- src/GraphLine.hpp | 12 +++++++++--- src/LineGraph.hpp | 12 +++++++++--- src/MovingAverageFilter.hpp | 9 ++++++--- src/ParallaxJoystick.hpp | 9 ++++++--- src/ScrollingLineGraph.hpp | 12 +++++++++--- src/ScrollingLineGraphMultiValue.hpp | 12 +++++++++--- src/Shape.hpp | 12 +++++++++--- 10 files changed, 75 insertions(+), 30 deletions(-) diff --git a/src/Button.hpp b/src/Button.hpp index 6a1d861..4538e77 100644 --- a/src/Button.hpp +++ b/src/Button.hpp @@ -32,9 +32,12 @@ * @endcode * * @author Jon E. Froehlich - * @jonfroehlich - * https://jonfroehlich.github.io/ - * https://makeabilitylab.github.io/physcomp/ + * + * By Professor Jon E. Froehlich + * Director, Makeability Lab: https://makeabilitylab.cs.washington.edu/ + * Physical Computing Textbook: https://makeabilitylab.github.io/physcomp/ + * + * SPDX-License-Identifier: MIT */ #pragma once #include diff --git a/src/ColorName.hpp b/src/ColorName.hpp index 89bde52..05d3272 100644 --- a/src/ColorName.hpp +++ b/src/ColorName.hpp @@ -21,9 +21,12 @@ * @endcode * * @author Jon E. Froehlich - * @jonfroehlich - * https://jonfroehlich.github.io/ - * https://makeabilitylab.github.io/physcomp/ + * + * By Professor Jon E. Froehlich + * Director, Makeability Lab: https://makeabilitylab.cs.washington.edu/ + * Physical Computing Textbook: https://makeabilitylab.github.io/physcomp/ + * + * SPDX-License-Identifier: MIT */ #pragma once #include diff --git a/src/FileUtils.hpp b/src/FileUtils.hpp index 1de02b3..748be8d 100644 --- a/src/FileUtils.hpp +++ b/src/FileUtils.hpp @@ -31,9 +31,12 @@ * @endcode * * @author Jon E. Froehlich - * @jonfroehlich - * https://jonfroehlich.github.io/ - * https://makeabilitylab.github.io/physcomp/ + * + * By Professor Jon E. Froehlich + * Director, Makeability Lab: https://makeabilitylab.cs.washington.edu/ + * Physical Computing Textbook: https://makeabilitylab.github.io/physcomp/ + * + * SPDX-License-Identifier: MIT */ #pragma once #include diff --git a/src/GraphLine.hpp b/src/GraphLine.hpp index 1f1a79a..5e33b05 100644 --- a/src/GraphLine.hpp +++ b/src/GraphLine.hpp @@ -11,9 +11,15 @@ * headers before this file if not already included. * * @author Jon E. Froehlich - * @jonfroehlich - * https://jonfroehlich.github.io/ - * https://makeabilitylab.github.io/physcomp/advancedio/oled.html + * + * Learn more in the Physical Computing textbook: + * - OLED displays: https://makeabilitylab.github.io/physcomp/advancedio/oled.html + * + * By Professor Jon E. Froehlich + * Director, Makeability Lab: https://makeabilitylab.cs.washington.edu/ + * Physical Computing Textbook: https://makeabilitylab.github.io/physcomp/ + * + * SPDX-License-Identifier: MIT */ #pragma once #include diff --git a/src/LineGraph.hpp b/src/LineGraph.hpp index cf1f022..257fad8 100644 --- a/src/LineGraph.hpp +++ b/src/LineGraph.hpp @@ -13,9 +13,15 @@ * @see ScrollingLineGraphMultiValue.hpp (newer version with more features) * * @author Jon E. Froehlich - * @jonfroehlich - * https://jonfroehlich.github.io/ - * https://makeabilitylab.github.io/physcomp/advancedio/oled.html + * + * Learn more in the Physical Computing textbook: + * - OLED displays: https://makeabilitylab.github.io/physcomp/advancedio/oled.html + * + * By Professor Jon E. Froehlich + * Director, Makeability Lab: https://makeabilitylab.cs.washington.edu/ + * Physical Computing Textbook: https://makeabilitylab.github.io/physcomp/ + * + * SPDX-License-Identifier: MIT */ #pragma once #include diff --git a/src/MovingAverageFilter.hpp b/src/MovingAverageFilter.hpp index 9cacf8e..cf86eb7 100644 --- a/src/MovingAverageFilter.hpp +++ b/src/MovingAverageFilter.hpp @@ -24,9 +24,12 @@ * @see https://makeabilitylab.github.io/physcomp/advancedio/smoothing-input.html * * @author Jon E. Froehlich - * @jonfroehlich - * https://jonfroehlich.github.io/ - * https://makeabilitylab.github.io/physcomp/ + * + * By Professor Jon E. Froehlich + * Director, Makeability Lab: https://makeabilitylab.cs.washington.edu/ + * Physical Computing Textbook: https://makeabilitylab.github.io/physcomp/ + * + * SPDX-License-Identifier: MIT */ #pragma once #include diff --git a/src/ParallaxJoystick.hpp b/src/ParallaxJoystick.hpp index 0db5860..1749cd6 100644 --- a/src/ParallaxJoystick.hpp +++ b/src/ParallaxJoystick.hpp @@ -23,9 +23,12 @@ * @endcode * * @author Jon E. Froehlich - * @jonfroehlich - * https://jonfroehlich.github.io/ - * https://makeabilitylab.github.io/physcomp/ + * + * By Professor Jon E. Froehlich + * Director, Makeability Lab: https://makeabilitylab.cs.washington.edu/ + * Physical Computing Textbook: https://makeabilitylab.github.io/physcomp/ + * + * SPDX-License-Identifier: MIT */ #pragma once #include diff --git a/src/ScrollingLineGraph.hpp b/src/ScrollingLineGraph.hpp index 80003d9..221f21e 100644 --- a/src/ScrollingLineGraph.hpp +++ b/src/ScrollingLineGraph.hpp @@ -28,9 +28,15 @@ * @endcode * * @author Jon E. Froehlich - * @jonfroehlich - * https://jonfroehlich.github.io/ - * https://makeabilitylab.github.io/physcomp/advancedio/oled.html + * + * Learn more in the Physical Computing textbook: + * - OLED displays: https://makeabilitylab.github.io/physcomp/advancedio/oled.html + * + * By Professor Jon E. Froehlich + * Director, Makeability Lab: https://makeabilitylab.cs.washington.edu/ + * Physical Computing Textbook: https://makeabilitylab.github.io/physcomp/ + * + * SPDX-License-Identifier: MIT */ #pragma once #include diff --git a/src/ScrollingLineGraphMultiValue.hpp b/src/ScrollingLineGraphMultiValue.hpp index 2f21460..bf7fbe7 100644 --- a/src/ScrollingLineGraphMultiValue.hpp +++ b/src/ScrollingLineGraphMultiValue.hpp @@ -33,9 +33,15 @@ * @endcode * * @author Jon E. Froehlich - * @jonfroehlich - * https://jonfroehlich.github.io/ - * https://makeabilitylab.github.io/physcomp/advancedio/oled.html + * + * Learn more in the Physical Computing textbook: + * - OLED displays: https://makeabilitylab.github.io/physcomp/advancedio/oled.html + * + * By Professor Jon E. Froehlich + * Director, Makeability Lab: https://makeabilitylab.cs.washington.edu/ + * Physical Computing Textbook: https://makeabilitylab.github.io/physcomp/ + * + * SPDX-License-Identifier: MIT */ #pragma once #include diff --git a/src/Shape.hpp b/src/Shape.hpp index b07ddc8..ead565a 100644 --- a/src/Shape.hpp +++ b/src/Shape.hpp @@ -42,9 +42,15 @@ * @endcode * * @author Jon E. Froehlich - * @jonfroehlich - * https://jonfroehlich.github.io/ - * https://makeabilitylab.github.io/physcomp/advancedio/oled.html + * + * Learn more in the Physical Computing textbook: + * - OLED displays: https://makeabilitylab.github.io/physcomp/advancedio/oled.html + * + * By Professor Jon E. Froehlich + * Director, Makeability Lab: https://makeabilitylab.cs.washington.edu/ + * Physical Computing Textbook: https://makeabilitylab.github.io/physcomp/ + * + * SPDX-License-Identifier: MIT */ #pragma once #include From 9678627a468cfef98c611fe7d6b460c361154db1 Mon Sep 17 00:00:00 2001 From: Jon Froehlich Date: Thu, 25 Jun 2026 12:00:35 -0700 Subject: [PATCH 3/3] Add CI: compile all examples on push/PR (arduino:avr:uno) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First CI for the library — the floor that mirrors the arduino repo's setup. Uses arduino/compile-sketches to build every sketch in examples/ against Uno, installing this repo plus the Adafruit SSD1306 / GFX / BusIO dependencies. Verified locally: all six examples compile clean. Board list is a matrix so coverage (e.g. ESP32) can be added once confirmed. Off-device unit tests for the pure-logic classes are a planned follow-up. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/compile-examples.yml | 63 ++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/compile-examples.yml diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml new file mode 100644 index 0000000..e3e6757 --- /dev/null +++ b/.github/workflows/compile-examples.yml @@ -0,0 +1,63 @@ +# Compiles every sketch in examples/ on each push and pull request, so a change +# that breaks the library (or an example) is caught before it lands. This is the +# floor of CI for this published Arduino library; off-device unit tests for the +# pure-logic classes (MovingAverageFilter, Shape collision, ColorName) are a +# planned follow-up. +# +# Uses the official arduino/compile-sketches action. +name: Compile Examples + +on: + push: + paths: + - "src/**" + - "examples/**" + - ".github/workflows/compile-examples.yml" + pull_request: + paths: + - "src/**" + - "examples/**" + - ".github/workflows/compile-examples.yml" + # Allow manual runs from the Actions tab. + workflow_dispatch: + +jobs: + compile: + name: ${{ matrix.board.fqbn }} + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + board: + # The verified floor (see CLAUDE.md). To extend coverage, add entries + # here once confirmed compiling, e.g.: + # - fqbn: esp32:esp32:esp32 + # platform-name: esp32:esp32 + # platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json + - fqbn: arduino:avr:uno + platform-name: arduino:avr + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Compile examples + uses: arduino/compile-sketches@v1 + with: + fqbn: ${{ matrix.board.fqbn }} + platforms: | + - name: ${{ matrix.board.platform-name }} + # Install this repo as a library (source-path: ./) alongside the + # Adafruit dependencies the examples need. Adafruit SSD1306 pulls in + # Adafruit GFX and Adafruit BusIO, but we list them explicitly so a + # dependency resolution change upstream can't silently break the build. + libraries: | + - source-path: ./ + - name: Adafruit SSD1306 + - name: Adafruit GFX Library + - name: Adafruit BusIO + sketch-paths: | + - examples + enable-warnings-report: true + verbose: false