From ec94f024cafdc1b2f369f24a9a41a5de448f049e Mon Sep 17 00:00:00 2001 From: devkyato <95612413+devkyato@users.noreply.github.com> Date: Wed, 12 Aug 2026 21:26:16 +0800 Subject: [PATCH 1/3] Add ButtonPause example and fix bug-template version. Demonstrate non-blocking pause/resume and correct the stale 1.0.0 placeholder claimed fixed in 1.0.2. Co-authored-by: Cursor --- .github/ISSUE_TEMPLATE/bug.yml | 2 +- CHANGELOG.md | 10 +++++++ README.md | 5 ++-- examples/ButtonPause/ButtonPause.ino | 39 ++++++++++++++++++++++++++++ 4 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 examples/ButtonPause/ButtonPause.ino diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index a3625e6..9f0c7bb 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -10,7 +10,7 @@ body: id: version attributes: label: Library version - placeholder: 1.0.0 + placeholder: 1.0.2 validations: required: true - type: input diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ec2f21..c272daf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to ArduinoPatterns are documented here. The project follows [Semantic Versioning](https://semver.org/). +## [Unreleased] + +### Added + +- Add a `ButtonPause` example showing non-blocking pause/resume with `stop()` and `start()`. + +### Fixed + +- Update the bug-report template placeholder to 1.0.2. + ## [1.0.2] - 2026-08-09 ### Changed diff --git a/README.md b/README.md index 2d9679f..39cffe5 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ serial communication, displays, or networking. - `LedAnimator`: play timed mask sequences using rollover-safe `millis()` logic. - `PeriodicOutput`: blink independent outputs at different rates. - No heap allocation, third-party dependencies, interrupts, or board-specific API. -- Six compile-checked examples spanning traffic lights, scanners, counters, - alternating masks, and independent blinkers. +- Seven compile-checked examples spanning traffic lights, scanners, counters, + alternating masks, independent blinkers, and button pause/resume. ## Installation @@ -70,6 +70,7 @@ responsive. | [BinaryCounter](examples/BinaryCounter/BinaryCounter.ino) | direct `LedBank` masks and rollover-safe timing | arrays, bit masks, and output mapping | | [CountUpDown](examples/CountUpDown/CountUpDown.ino) | longer repeating animation tables | progression toward state-machine lessons | | [IndependentBlink](examples/IndependentBlink/IndependentBlink.ino) | two concurrent periodic outputs | cooperative scheduling used throughout Exercises C–F | +| [ButtonPause](examples/ButtonPause/ButtonPause.ino) | pause and resume with `stop()` / `start()` | interactive control without blocking `loop()` | These examples are maintained adaptations of concepts present in the repository's earlier laboratory sketches; they are not claimed as unchanged originals. Git diff --git a/examples/ButtonPause/ButtonPause.ino b/examples/ButtonPause/ButtonPause.ino new file mode 100644 index 0000000..c9e46e2 --- /dev/null +++ b/examples/ButtonPause/ButtonPause.ino @@ -0,0 +1,39 @@ +#include + +// Pause and resume a scanning animation with a momentary button on pin 2. +// The button uses INPUT_PULLUP; press to ground. + +const uint8_t pins[] = {6, 7, 8, 9}; +const PatternStep steps[] = { + {0b0001, 120}, + {0b0010, 120}, + {0b0100, 120}, + {0b1000, 120}, + {0b0100, 120}, + {0b0010, 120}, +}; + +LedBank lights(pins, 4); +LedAnimator scanner(lights, steps, 6); +const uint8_t kPauseButton = 2; +bool previousPressed = false; + +void setup() { + pinMode(kPauseButton, INPUT_PULLUP); + lights.begin(); + scanner.start(millis()); +} + +void loop() { + const uint32_t now = millis(); + const bool pressed = digitalRead(kPauseButton) == LOW; + if (pressed && !previousPressed) { + if (scanner.running()) { + scanner.stop(false); + } else { + scanner.start(now); + } + } + previousPressed = pressed; + scanner.update(now); +} From 467d479e901fd4c7ec7556fc39d6ea8ac999e695 Mon Sep 17 00:00:00 2001 From: devkyato <95612413+devkyato@users.noreply.github.com> Date: Wed, 12 Aug 2026 23:35:47 +0800 Subject: [PATCH 2/3] Release ArduinoPatterns 1.0.3 Co-authored-by: Cursor --- .zenodo.json | 4 ++-- CHANGELOG.md | 3 +++ CITATION.cff | 8 ++++---- README.md | 8 ++++---- RELEASE_NOTES.md | 16 ++++++---------- library.json | 2 +- library.properties | 2 +- tools/validate_metadata.py | 2 +- 8 files changed, 22 insertions(+), 23 deletions(-) diff --git a/.zenodo.json b/.zenodo.json index 0a47b6e..ceeab1f 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -2,8 +2,8 @@ "creators": [{"name": "@dev.mako (devkyato)", "affiliation": "MATA Company"}], "contributors": [{"name": "Cursor Agent", "type": "Other"}], "title": "ArduinoPatterns: non-blocking LED and digital-output patterns for Arduino", - "description": "

Overview

ArduinoPatterns is a compact teaching and prototyping library for coordinating LEDs and other digital outputs without blocking the main loop.

Capabilities

  • LedBank maps up to 32 pins to a bit mask.
  • LedAnimator plays rollover-safe timed sequences with millis().
  • PeriodicOutput toggles independent outputs at separate rates.
  • The implementation uses no heap allocation, interrupts, third-party dependencies, or board-specific APIs.

Installation

Download the release ZIP and use Arduino IDE Sketch > Include Library > Add .ZIP Library, or add https://github.com/devkyato/Custom-Arduino-Libraries.git#v1.0.2 to PlatformIO lib_deps.

Quick start

#include <ArduinoPatterns.h>\nconst uint8_t pins[] = {6, 7, 8};\nconst PatternStep steps[] = {{0b001, 5000}, {0b010, 2000}, {0b100, 5000}};\nLedBank lights(pins, 3);\nLedAnimator traffic(lights, steps, 3);\nvoid setup() { lights.begin(); traffic.start(millis()); }\nvoid loop() { traffic.update(millis()); }

Applications

  • Traffic lights, scanners, counters, status indicators, and active-low modules.
  • Lessons on bit masks, elapsed-time scheduling, and cooperative state machines.
  • Responsive sketches that continue reading sensors, buttons, serial, or network input.

Compatibility, safety, and limitations

The API uses standard Arduino digital I/O and unsigned millisecond arithmetic. CI compile coverage is not hardware validation. GPIO current and voltage limits still apply; use resistors and appropriate drivers for loads. A bank is limited to 32 outputs, callers retain ownership of pin and step arrays, and a zero interval disables periodic toggling.

Documentation

Related software

Arduino Programs Guide is the companion course and introduces the progression that this library generalizes from Exercise B onward.

Citation

@dev.mako (devkyato). (2026). ArduinoPatterns: non-blocking LED and digital-output patterns for Arduino (Version 1.0.2). Zenodo. https://doi.org/10.5281/zenodo.21853284

", - "version": "1.0.2", + "description": "

Overview

ArduinoPatterns is a compact teaching and prototyping library for coordinating LEDs and other digital outputs without blocking the main loop.

Capabilities

  • LedBank maps up to 32 pins to a bit mask.
  • LedAnimator plays rollover-safe timed sequences with millis().
  • PeriodicOutput toggles independent outputs at separate rates.
  • The implementation uses no heap allocation, interrupts, third-party dependencies, or board-specific APIs.

Installation

Download the release ZIP and use Arduino IDE Sketch > Include Library > Add .ZIP Library, or add https://github.com/devkyato/Custom-Arduino-Libraries.git#v1.0.3 to PlatformIO lib_deps.

Quick start

#include <ArduinoPatterns.h>\nconst uint8_t pins[] = {6, 7, 8};\nconst PatternStep steps[] = {{0b001, 5000}, {0b010, 2000}, {0b100, 5000}};\nLedBank lights(pins, 3);\nLedAnimator traffic(lights, steps, 3);\nvoid setup() { lights.begin(); traffic.start(millis()); }\nvoid loop() { traffic.update(millis()); }

Applications

  • Traffic lights, scanners, counters, status indicators, and active-low modules.
  • Lessons on bit masks, elapsed-time scheduling, and cooperative state machines.
  • Responsive sketches that continue reading sensors, buttons, serial, or network input.

Compatibility, safety, and limitations

The API uses standard Arduino digital I/O and unsigned millisecond arithmetic. CI compile coverage is not hardware validation. GPIO current and voltage limits still apply; use resistors and appropriate drivers for loads. A bank is limited to 32 outputs, callers retain ownership of pin and step arrays, and a zero interval disables periodic toggling.

Documentation

Related software

Arduino Programs Guide is the companion course and introduces the progression that this library generalizes from Exercise B onward.

Citation

@dev.mako (devkyato). (2026). ArduinoPatterns: non-blocking LED and digital-output patterns for Arduino (Version 1.0.3). Zenodo. https://doi.org/10.5281/zenodo.21853284

", + "version": "1.0.3", "keywords": ["Arduino", "LED", "digital output", "non-blocking", "millis", "state machine", "library", "education", "ESP32", "RP2040"], "license": "mit", "upload_type": "software", diff --git a/CHANGELOG.md b/CHANGELOG.md index c272daf..a56d84f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to ArduinoPatterns are documented here. The project follows ## [Unreleased] +## [1.0.3] - 2026-08-12 + ### Added - Add a `ButtonPause` example showing non-blocking pause/resume with `stop()` and `start()`. @@ -51,4 +53,5 @@ All notable changes to ArduinoPatterns are documented here. The project follows [1.0.0]: https://github.com/devkyato/Custom-Arduino-Libraries/releases/tag/v1.0.0 [1.0.1]: https://github.com/devkyato/Custom-Arduino-Libraries/compare/v1.0.0...v1.0.1 +[1.0.3]: https://github.com/devkyato/Custom-Arduino-Libraries/compare/v1.0.2...v1.0.3 [1.0.2]: https://github.com/devkyato/Custom-Arduino-Libraries/compare/v1.0.1...v1.0.2 diff --git a/CITATION.cff b/CITATION.cff index 91ac2dc..3b089ef 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -4,8 +4,8 @@ title: "ArduinoPatterns: non-blocking LED and digital-output patterns for Arduin authors: - name: "@dev.mako (devkyato)" affiliation: "MATA Company" -version: 1.0.2 -date-released: 2026-08-09 +version: 1.0.3 +date-released: 2026-08-12 license: MIT repository-code: "https://github.com/devkyato/Custom-Arduino-Libraries" url: "https://github.com/devkyato/Custom-Arduino-Libraries" @@ -36,8 +36,8 @@ preferred-citation: authors: - name: "@dev.mako (devkyato)" affiliation: "MATA Company" - version: 1.0.2 - date-released: 2026-08-09 + version: 1.0.3 + date-released: 2026-08-12 repository-code: "https://github.com/devkyato/Custom-Arduino-Libraries" doi: 10.5281/zenodo.21853284 license: MIT diff --git a/README.md b/README.md index 39cffe5..b7ac6ca 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.21853284.svg)](https://doi.org/10.5281/zenodo.21853284) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) -ArduinoPatterns 1.0.2 is a focused Arduino library for coordinating LEDs and +ArduinoPatterns 1.0.3 is a focused Arduino library for coordinating LEDs and other digital outputs without blocking `loop()`. It packages common teaching patterns into reusable components that can run alongside buttons, sensors, serial communication, displays, or networking. @@ -25,7 +25,7 @@ Library** in Arduino IDE. In PlatformIO: ```ini lib_deps = - https://github.com/devkyato/Custom-Arduino-Libraries.git#v1.0.2 + https://github.com/devkyato/Custom-Arduino-Libraries.git#v1.0.3 ``` To work from source, clone the repository into the Arduino `libraries` folder or @@ -108,7 +108,7 @@ architectures may work but are unverified. - [Examples gallery](#examples-gallery) — working sketches mapped to concepts. - [Contributing guide](CONTRIBUTING.md) — development and test expectations. - [Security policy](SECURITY.md) — supported release and reporting process. -- [Changelog](CHANGELOG.md) and [1.0.2 release notes](RELEASE_NOTES.md). +- [Changelog](CHANGELOG.md) and [1.0.3 release notes](RELEASE_NOTES.md). ## Citation @@ -116,7 +116,7 @@ If you use this software in research or teaching, cite the archived release when available, or use: ```text -@dev.mako (devkyato). (2026). ArduinoPatterns: non-blocking LED and digital-output patterns for Arduino (Version 1.0.2). Zenodo. https://doi.org/10.5281/zenodo.21853284 +@dev.mako (devkyato). (2026). ArduinoPatterns: non-blocking LED and digital-output patterns for Arduino (Version 1.0.3). Zenodo. https://doi.org/10.5281/zenodo.21853284 ``` See [CITATION.cff](CITATION.cff) for machine-readable metadata. diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 47dabbd..3bb57f4 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,24 +1,21 @@ -# ArduinoPatterns 1.0.2 +# ArduinoPatterns 1.0.3 -Publication and documentation quality release for Zenodo archival presentation. +Patch release: ButtonPause example and bug-template version fix. ## Highlights -- Expand README installation, applications, limitations, documentation index, and citation guidance. -- Add an examples gallery that maps each sketch to concepts and the companion Arduino Programs Guide. -- Package `docs/API.md`, `CITATION.cff`, release notes, and governance files in the Arduino IDE ZIP. -- Align metadata attribution on `@dev.mako (devkyato)` and validate release metadata before packaging. -- Compile every example across Uno, ESP32, and RP2040 CI targets. +- Add a `ButtonPause` example showing non-blocking pause/resume with `stop()` and `start()`. +- Update the bug-report template placeholder to the current release version. ## Install -Arduino IDE: download `ArduinoPatterns-1.0.2.zip` and choose **Sketch > Include Library > Add .ZIP Library**. +Arduino IDE: download `ArduinoPatterns-1.0.3.zip` and choose **Sketch > Include Library > Add .ZIP Library**. PlatformIO: ```ini lib_deps = - https://github.com/devkyato/Custom-Arduino-Libraries.git#v1.0.2 + https://github.com/devkyato/Custom-Arduino-Libraries.git#v1.0.3 ``` ## Citation @@ -28,4 +25,3 @@ Concept DOI: https://doi.org/10.5281/zenodo.21853284 See `CITATION.cff` for machine-readable citation metadata. Published by @dev.mako (devkyato). Cursor Agent is acknowledged as a non-author contributor. - diff --git a/library.json b/library.json index 262ef6e..01f0e3b 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "ArduinoPatterns", - "version": "1.0.2", + "version": "1.0.3", "description": "Rollover-safe, non-blocking LED and digital-output patterns for Arduino without interrupts or heap allocation.", "keywords": ["arduino", "led", "digital-output", "non-blocking", "millis", "state-machine", "education"], "repository": { diff --git a/library.properties b/library.properties index 0ebee26..86ef466 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=ArduinoPatterns -version=1.0.2 +version=1.0.3 author=@dev.mako (devkyato) and contributors maintainer=@dev.mako (devkyato) sentence=Non-blocking LED and digital-output patterns for Arduino. diff --git a/tools/validate_metadata.py b/tools/validate_metadata.py index 3559ee7..d2dcafd 100644 --- a/tools/validate_metadata.py +++ b/tools/validate_metadata.py @@ -67,7 +67,7 @@ def main() -> None: cff = (ROOT / "CITATION.cff").read_text(encoding="utf-8") readme = (ROOT / "README.md").read_text(encoding="utf-8") - assert version == "1.0.2" + assert version == "1.0.3" assert zenodo["version"] == version assert library_json["version"] == version assert re.search(rf"^version: {re.escape(version)}$", cff, re.MULTILINE) From 7f4b36630d4a8c4ecc1287e1653686f113a69578 Mon Sep 17 00:00:00 2001 From: devkyato <95612413+devkyato@users.noreply.github.com> Date: Wed, 12 Aug 2026 23:36:23 +0800 Subject: [PATCH 3/3] Bump bug-template placeholder to 1.0.3 Co-authored-by: Cursor --- .github/ISSUE_TEMPLATE/bug.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index 9f0c7bb..0f9ecea 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -10,7 +10,7 @@ body: id: version attributes: label: Library version - placeholder: 1.0.2 + placeholder: 1.0.3 validations: required: true - type: input