Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Bug report
description: Report reproducible incorrect behavior.
title: "[Bug]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: Please avoid including secrets or private information.
- type: input
id: version
attributes:
label: Library version
placeholder: 1.0.0
validations:
required: true
- type: input
id: board
attributes:
label: Board and core version
placeholder: Arduino Uno, Arduino AVR Boards 1.8.6
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Minimal sketch and reproduction steps
render: cpp
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected and actual behavior
validations:
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Security report
url: https://github.com/devkyato/Custom-Arduino-Libraries/security/advisories/new
about: Report vulnerabilities privately.
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Feature request
description: Propose a focused, reusable improvement.
title: "[Feature]: "
labels: ["enhancement"]
body:
- type: textarea
id: problem
attributes:
label: Problem
description: What project or teaching problem should this solve?
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposed API or behavior
validations:
required: true
- type: dropdown
id: compatibility
attributes:
label: Required boards
multiple: true
options:
- AVR / Uno
- ESP32
- RP2040 / Pico
- Other
validations:
required: true
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Summary

<!-- What changes for library users? -->

## Verification

- [ ] Native tests pass (`pio test -e native`)
- [ ] Relevant board environments compile
- [ ] Documentation or examples are updated
- [ ] `CHANGELOG.md` is updated for user-visible changes

## Hardware

<!-- List boards and wiring tested, or write "Not hardware-tested". -->
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
groups:
actions:
patterns: ["*"]
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
native-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.14"
- run: python -m pip install "platformio==6.1.18"
- run: pio test -e native

compile:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
environment: [uno, esp32dev, pico]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.14"
- run: python -m pip install "platformio==6.1.18"
- run: pio run -e ${{ matrix.environment }}

package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.14"
- run: python tools/build_release.py
- uses: actions/upload-artifact@v6
with:
name: ArduinoPatterns
path: dist/ArduinoPatterns-*.zip
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release

on:
push:
tags: ["v*"]

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.14"
- name: Verify tag matches library version
shell: bash
run: |
version="$(sed -n 's/^version=//p' library.properties)"
test "${GITHUB_REF_NAME}" = "v${version}"
- run: python tools/build_release.py
- name: Publish GitHub release
env:
GH_TOKEN: ${{ github.token }}
run: gh release create "$GITHUB_REF_NAME" dist/*.zip --generate-notes --verify-tag
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,14 @@

# debug information files
*.dwo

# PlatformIO and editor state
.pio/
.vscode/

# Python tooling
__pycache__/
*.py[cod]

# Release artifacts
dist/
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Changelog

All notable changes to ArduinoPatterns are documented here. The project follows
[Semantic Versioning](https://semver.org/).

## [1.0.0] - 2026-07-29

### Added

- `LedBank` for controlling up to 32 active-high or active-low outputs as a mask.
- `LedAnimator` for rollover-safe, non-blocking timed sequences.
- `PeriodicOutput` for independent periodic digital outputs.
- Six Arduino IDE examples adapted from the repository's original exercises.
- Native timing tests and compile checks for Uno, ESP32, and Raspberry Pi Pico.
- Arduino IDE ZIP and PlatformIO installation metadata.

[1.0.0]: https://github.com/devkyato/Custom-Arduino-Libraries/releases/tag/v1.0.0
27 changes: 27 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Code of Conduct

## Our commitment

We are committed to a welcoming, harassment-free learning environment regardless
of experience level, background, identity, or ability.

## Expected behavior

- Be respectful, patient, and constructive.
- Explain technical feedback without belittling people.
- Welcome beginner questions and acknowledge honest mistakes.
- Keep discussions relevant to the project.

Harassment, personal attacks, discriminatory language, and publishing another
person's private information are not acceptable.

## Enforcement

Report unacceptable behavior privately to the repository maintainer through the
contact method on their GitHub profile. Reports will be reviewed fairly and kept
confidential where possible. Maintainers may edit or remove content, reject
contributions, or restrict participation when needed.

This policy is adapted from the [Contributor Covenant 2.1][covenant].

[covenant]: https://www.contributor-covenant.org/version/2/1/code_of_conduct/
35 changes: 35 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Contributing

ArduinoPatterns is intended to be approachable for students and first-time
open-source contributors.

## Before you start

1. Search existing issues before opening a new one.
2. For behavior changes or new public APIs, open an issue first.
3. Keep the library non-blocking and avoid heap allocation.

## Local checks

Install [PlatformIO Core](https://docs.platformio.org/en/latest/core/) and run:

```sh
pio test -e native
pio run -e uno
pio run -e esp32dev
pio run -e pico
python tools/build_release.py
```

Changes to timing logic need a native regression test. New features should include
an Arduino example or update an existing one. Hardware-dependent changes should
state the board and wiring used for verification.

## Pull requests

- Keep each pull request focused on one change.
- Use clear commit messages and explain the user-visible result.
- Update `CHANGELOG.md` for user-facing changes.
- Do not commit `.pio`, editor state, or generated `dist` files.

By participating, you agree to follow the [Code of Conduct](CODE_OF_CONDUCT.md).
122 changes: 0 additions & 122 deletions Exercise_A.ino

This file was deleted.

Loading