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
38 changes: 38 additions & 0 deletions .github/workflows/arduino-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Arduino Library Lint

on:
pull_request:
push:
branches:
- main
tags:
- "v*"

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Check tag and library version
if: github.ref_type == 'tag'
shell: bash
run: |
library_version="$(sed -n 's/^version=//p' library.properties)"
tag_version="${GITHUB_REF_NAME#v}"
if [[ -z "${library_version}" || "${tag_version}" != "${library_version}" ]]; then
echo "Tag ${GITHUB_REF_NAME} does not match library version ${library_version}." >&2
exit 1
fi

- name: Run Arduino Lint
uses: arduino/arduino-lint-action@v3
with:
compliance: strict
library-manager: submit
project-type: library
recursive: false
26 changes: 17 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
# RadioCore Library
# RadioCore_Kit

RadioCore Library is the shared Arduino library for RadioCore series hardware.
RadioCore_Kit is the shared Arduino library for RadioCore series hardware.
It provides compile-time board configuration used by portable, board-adaptive
examples.

## Installation

Clone or copy this repository into the `libraries` directory of your Arduino
sketchbook, then restart the Arduino IDE if it is already running.
Open Library Manager in the Arduino IDE, search for `RadioCore_Kit`, and select
**Install**. Arduino CLI users can install the library with:

```sh
arduino-cli lib install RadioCore_Kit
```

For development versions that have not been released, clone or copy this
repository into the `libraries` directory of your Arduino sketchbook, then
restart the Arduino IDE if it is already running.

Sketches can include the library with:

```cpp
#include <RadioCore.h>
#include <RadioCore_Kit.h>
```

## Dependencies
Expand All @@ -26,7 +34,7 @@ The library declares these Arduino dependencies:
- `ESP32Servo` for ESP32-based RadioCore boards

Dependency-aware Arduino tools can install these libraries automatically.
RadioCore Library does not copy, wrap, or re-export them.
RadioCore_Kit does not copy, wrap, or re-export them.

The Heltec nRF52 board package supplies the Arduino official `Servo` library
used by `Servo_Control` on RC52; no separate Servo library installation is
Expand All @@ -40,7 +48,7 @@ the Arduino Library Manager version of `GFX Library for Arduino`.

## Examples

Open the examples from `File > Examples > RadioCore Library` in the Arduino
Open the examples from `File > Examples > RadioCore_Kit` in the Arduino
IDE. Board configuration macros select the supported pins and peripherals at
compile time.

Expand Down Expand Up @@ -84,10 +92,10 @@ nRF52 peripheral APIs used by RC32, RCC6, and RC52. A board with a different
I2C, ADC, SPI, or servo API may require a new architecture path in the relevant
example.

Unknown boards can still include `RadioCore.h`. All example capability macros
Unknown boards can still include `RadioCore_Kit.h`. All example capability macros
default to disabled, and an unsupported example reports its missing capability
during preprocessing.

## License

RadioCore Library is released under the MIT License. See [LICENSE](LICENSE).
RadioCore_Kit is released under the MIT License. See [LICENSE](LICENSE).
4 changes: 2 additions & 2 deletions docs/CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ series hardware.

## Language

**RadioCore Library**:
**RadioCore_Kit**:
The shared Arduino package for the RadioCore hardware family.
_Avoid_: sensor driver bundle, full board support package
_Avoid_: RadioCore Library, sensor driver bundle, full board support package

**Sensor I2C**:
The board-designated I2C bus used by RadioCore examples for external sensors.
Expand Down
27 changes: 27 additions & 0 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Releasing RadioCore_Kit

RadioCore_Kit uses Semantic Versioning. The version in `library.properties` is
the release version and each release tag must use the matching `vX.Y.Z` form.

## Release procedure

1. Update `version` in `library.properties` and prepare the GitHub release notes.
2. Run Arduino Lint with strict compliance and the applicable Library Manager
mode. Use `submit` until the library is accepted into the registry, then use
`update` for all later releases.
3. Confirm `git diff --check` passes and the tag name without its leading `v`
exactly matches the version in `library.properties`.
4. Merge the verified release commit to `main`.
5. Create and push an annotated `vX.Y.Z` tag on that commit, then create a
non-draft, non-prerelease GitHub Release from the tag. Use GitHub's generated
source archives; do not attach a custom library ZIP.
6. Check the Arduino Library Manager indexer logs for the repository.

The release gate is static only. It does not compile the examples or prove
behavior on RC32, RCC6, RC52, or attached hardware. Release notes must state
this limitation.

Before the first version is accepted into the Library Manager index, a rejected
tag may be removed and recreated after fixing the release. Once a version has
entered the index, never move or recreate its tag; publish a new patch version
instead.
2 changes: 1 addition & 1 deletion examples/BH1750_Read/BH1750_Read.ino
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <Arduino.h>
#include <Wire.h>
#include <RadioCore.h>
#include <RadioCore_Kit.h>

#if !RADIOCORE_HAS_SENSOR_I2C
#error "BH1750_Read requires a RadioCore SENSOR_I2C board configuration."
Expand Down
2 changes: 1 addition & 1 deletion examples/CH01_Read/CH01_Read.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <Arduino.h>
#include <RadioCore.h>
#include <RadioCore_Kit.h>

#if !RADIOCORE_HAS_CH01_ADC
#error "CH01_Read requires a RadioCore CH01 ADC board configuration."
Expand Down
2 changes: 1 addition & 1 deletion examples/CO01_Read/CO01_Read.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <Arduino.h>
#include <RadioCore.h>
#include <RadioCore_Kit.h>

#if !RADIOCORE_HAS_CO01_ADC
#error "CO01_Read requires a RadioCore CO01 ADC board configuration."
Expand Down
2 changes: 1 addition & 1 deletion examples/Motor_Control/Motor_Control.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* direction for later runs. RCC6 GPIO3/GPIO4 overlap NV3001B DC/SCK.
*/
#include <Arduino.h>
#include <RadioCore.h>
#include <RadioCore_Kit.h>

#if !RADIOCORE_HAS_MOTOR_CONTROL
#error "Motor_Control requires a RadioCore motor control board configuration."
Expand Down
2 changes: 1 addition & 1 deletion examples/NV3001B_Display/NV3001B_Display.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* https://github.com/Quency-D/Arduino_GFX
*/
#include <Arduino.h>
#include <RadioCore.h>
#include <RadioCore_Kit.h>

#if !RADIOCORE_HAS_NV3001B_DISPLAY
#error "NV3001B_Display requires a RadioCore NV3001B board configuration."
Expand Down
2 changes: 1 addition & 1 deletion examples/Relay_Control/Relay_Control.ino
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#endif

#include <Arduino.h>
#include <RadioCore.h>
#include <RadioCore_Kit.h>

#if !RADIOCORE_HAS_RELAY_CONTROL
#error "Relay_Control requires a RadioCore relay control board configuration."
Expand Down
2 changes: 1 addition & 1 deletion examples/Servo_Control/Servo_Control.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* PWM pins overlap Motor_Control on all boards and NV3001B signals on RCC6.
*/
#include <Arduino.h>
#include <RadioCore.h>
#include <RadioCore_Kit.h>

#if !RADIOCORE_HAS_SERVO_CONTROL
#error "Servo_Control requires a RadioCore servo control board configuration."
Expand Down
2 changes: 1 addition & 1 deletion examples/Soil_Moisture_Read/Soil_Moisture_Read.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <Arduino.h>
#include <RadioCore.h>
#include <RadioCore_Kit.h>

#if !RADIOCORE_HAS_SOIL_MOISTURE_ADC
#error "Soil_Moisture_Read requires a RadioCore soil moisture ADC board configuration."
Expand Down
2 changes: 1 addition & 1 deletion examples/VO01_Read/VO01_Read.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <Arduino.h>
#include <RadioCore.h>
#include <RadioCore_Kit.h>

#if !RADIOCORE_HAS_VO01_ADC
#error "VO01_Read requires a RadioCore VO01 ADC board configuration."
Expand Down
2 changes: 1 addition & 1 deletion examples/WS2812/WS2812.ino
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define LED_COUNT 30

#include <Arduino.h>
#include <RadioCore.h>
#include <RadioCore_Kit.h>

#if !RADIOCORE_HAS_WS2812
#error "WS2812 requires a RadioCore WS2812 board configuration."
Expand Down
6 changes: 3 additions & 3 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name=RadioCore Library
version=0.0.1
name=RadioCore_Kit
version=1.0.0
author=Heltec Automation
maintainer=Heltec Automation <support@heltec.cn>
sentence=Arduino library for RadioCore series hardware.
paragraph=Provides compile-time board configuration for RadioCore hardware and declares sensor-library dependencies used by its examples.
category=Device Control
url=https://github.com/HelTecAutomation/RadioCore_Library
architectures=*
includes=RadioCore.h
includes=RadioCore_Kit.h
depends=Adafruit BME280 Library, BH1750 (>=1.3.0), Adafruit NeoPixel, ESP32Servo
6 changes: 0 additions & 6 deletions src/RadioCore.h

This file was deleted.

6 changes: 6 additions & 0 deletions src/RadioCore_Kit.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef RADIOCORE_KIT_H
#define RADIOCORE_KIT_H

#include "RadioCoreBoardConfig.h"

#endif // RADIOCORE_KIT_H
Loading