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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
18 changes: 18 additions & 0 deletions .github/workflows/add_issue_to_project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This action will add your issue to our Product Defect Project
name: Add new issue to main project

on:
issues:
types:
- opened

jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/sparkfun/projects/19
github-token: ${{ secrets.DEFECT_ADD_TO_PROJECT }}

64 changes: 64 additions & 0 deletions .github/workflows/build-deploy-ghpages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build Documentation and Deploy

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read
id-token: write
pages: write

concurrency:
group: "pages"
cancel-in-progress: true

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: "true"

- name: Set Version
run: echo "PROJECT_NUMBER = `git describe --tags`" >> ./docs/doxygen/doxygen-config

- name: Build Documentation
uses: mattnotmitt/doxygen-action@v1.9.5
with:
doxyfile-path: "./docs/doxygen/doxygen-config"

# Upload the documentation as an artifact
- name: Upload documentation
uses: actions/upload-pages-artifact@v3.0.1
with:
path: ./docs/html

# Deploy job
deploy:
# Add a dependency to the build job
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
122 changes: 122 additions & 0 deletions .github/workflows/cross-compilation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Cross-compilation Library Test

on:
push:
branches:
- main
pull_request:
workflow_dispatch:


jobs:
compile-sketch:
runs-on: ubuntu-latest

strategy:
fail-fast: false

matrix:
board:
# Uno (ATmega328P) - the 2 kB SRAM / 32 kB flash floor the README promises
- fqbn: arduino:avr:uno
name: arduino:avr
source-url: https://downloads.arduino.cc/packages/package_index.json

# Mega 2560
# https://github.com/arduino/ArduinoCore-avr/blob/master/boards.txt
- fqbn: arduino:avr:mega
name: arduino:avr
source-url: https://downloads.arduino.cc/packages/package_index.json

# ESP32
# https://github.com/espressif/arduino-esp32/blob/master/boards.txt
- fqbn: esp32:esp32:esp32
name: esp32:esp32
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

# ESP32-S2
- fqbn: esp32:esp32:esp32s2
name: esp32:esp32
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

# ESP32-C3
- fqbn: esp32:esp32:esp32c3
name: esp32:esp32
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

# ESP8266
# https://github.com/esp8266/Arduino/blob/master/boards.txt
- fqbn: esp8266:esp8266:thingdev
name: esp8266:esp8266
source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json

# SAMD21
# https://github.com/arduino/ArduinoCore-samd/blob/master/boards.txt
- fqbn: arduino:samd:mkr1000
name: arduino:samd
source-url: https://downloads.arduino.cc/packages/package_index.json

# Nano BLE 33 / nRF52840
# https://github.com/arduino/ArduinoCore-mbed/blob/master/boards.txt
- fqbn: arduino:mbed:nano33ble
name: arduino:mbed
source-url: https://downloads.arduino.cc/packages/package_index.json

# RP2040
# https://github.com/earlephilhower/arduino-pico/blob/master/boards.txt
- fqbn: rp2040:rp2040:sparkfun_promicrorp2040
name: rp2040:rp2040
source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json

# RP2350
- fqbn: rp2040:rp2040:sparkfun_promicrorp2350
name: rp2040:rp2040
source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json

# STM32
# https://github.com/stm32duino/Arduino_Core_STM32/blob/main/boards.txt
- fqbn: STMicroelectronics:stm32:GenF4
name: STMicroelectronics:stm32
source-url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json

# not using the arduino action to compile everything - it fails to load libraries at a given ref/branch
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Branch name
run: echo running on branch ${GITHUB_REF##*/}

- name: Arduino - Install and setup the Arduino CLI
uses: arduino/setup-arduino-cli@v2

- name: Arduino - Start config file
run: arduino-cli config init --additional-urls ${{ matrix.board.source-url}}

- name: Arduino - Update index
run: arduino-cli core update-index

- name: Arduino - Install platform
run: arduino-cli core install ${{ matrix.board.name}}

- name: Arduino - Install libraries
run: |
arduino-cli config set library.enable_unsafe_install true
arduino-cli version
arduino-cli lib install "SparkFun Toolkit"@1.2.0

# Compile every example, not just the first one. With a dozen sketches exercising
# different corners of the driver - FIFO, feature engine, self-test - a single-example
# check would miss most of the library.
- name: Compile all examples
run: |
status=0
for example in examples/*/ ; do
echo "::group::${example}"
if ! arduino-cli compile --fqbn ${{ matrix.board.fqbn }} "${example}" --library . ; then
echo "::error::${example} failed to compile for ${{ matrix.board.fqbn }}"
status=1
fi
echo "::endgroup::"
done
exit $status
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Doxygen build output (generated by .github/workflows/build-deploy-ghpages.yml)
docs/html/
docs/latex/

# Arduino / build artifacts
*.o
*.a
*.elf
*.hex
*.bin
build/

# One-time repo bootstrap files (bundle + setup script); safe to delete once pushed
_repo-setup/

# Editor / OS cruft
.vscode/
.DS_Store
Thumbs.db
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "docs/doxygen/doxygen-awesome-css"]
path = docs/doxygen/doxygen-awesome-css
url = https://github.com/jothepro/doxygen-awesome-css.git
43 changes: 43 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
SparkFun License Information
============================

SparkFun uses two different licenses for our files — one for hardware and one for code.

Hardware
---------

**SparkFun hardware is released under [Creative Commons Share-alike 4.0 International](http://creativecommons.org/licenses/by-sa/4.0/).**

Note: This is a human-readable summary of (and not a substitute for) the [license](http://creativecommons.org/licenses/by-sa/4.0/legalcode).

You are free to:

Share — copy and redistribute the material in any medium or format
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:

Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.

Notices:

You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.


Code
--------

**SparkFun code, firmware, and software are released under the [MIT License](http://opensource.org/licenses/MIT).**

The MIT License (MIT)

Copyright (c) 2026 SparkFun Electronics

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading
Loading