Skip to content

Commit 3cfc07a

Browse files
committed
Merge branch 'develop'
2 parents 410cf46 + 92f59b1 commit 3cfc07a

18 files changed

Lines changed: 326 additions & 218 deletions

.github/workflows/arduino-esp-v2-build-check.yml

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,28 @@ on:
1212
branches:
1313
- '*'
1414
paths:
15-
- 'src/unit/**.cpp'
16-
- 'src/unit/**.hpp'
17-
- 'src/unit/**.h'
18-
- 'src/unit/**.c'
15+
- 'src/**.cpp'
16+
- 'src/**.hpp'
17+
- 'src/**.h'
18+
- 'src/**.c'
1919
- 'examples/UnitUnified/**.ino'
2020
- 'examples/UnitUnified/**.cpp'
2121
- 'examples/UnitUnified/**.hpp'
2222
- 'examples/UnitUnified/**.h'
2323
- 'examples/UnitUnified/**.c'
24-
- '**arduino-esp-v2-build-check.yml'
24+
- '.github/workflows/arduino-esp-v2-build-check.yml'
2525
pull_request:
2626
paths:
27-
- 'src/unit/**.cpp'
28-
- 'src/unit/**.hpp'
29-
- 'src/unit/**.h'
30-
- 'src/unit/**.c'
27+
- 'src/**.cpp'
28+
- 'src/**.hpp'
29+
- 'src/**.h'
30+
- 'src/**.c'
3131
- 'examples/UnitUnified/**.ino'
3232
- 'examples/UnitUnified/**.cpp'
3333
- 'examples/UnitUnified/**.hpp'
3434
- 'examples/UnitUnified/**.h'
3535
- 'examples/UnitUnified/**.c'
36-
- '**arduino-esp-v2-build-check.yml'
36+
- '.github/workflows/arduino-esp-v2-build-check.yml'
3737
workflow_dispatch:
3838

3939
defaults:
@@ -85,16 +85,26 @@ jobs:
8585
- name: Checkout
8686
uses: actions/checkout@v4
8787

88-
# Build
88+
- name: Prepare libraries list
89+
id: libs
90+
run: |
91+
{
92+
echo "yaml<<EOF"
93+
echo "$REQUIRED_LIBRARIES" | tr ',' '\n' | while read -r lib; do
94+
echo "- name: $lib"
95+
done
96+
echo "- source-path: ./"
97+
echo "EOF"
98+
} >> "$GITHUB_OUTPUT"
99+
89100
- name: Compile examples
90-
uses: ArminJo/arduino-test-compile@master
101+
uses: arduino/compile-sketches@v1
91102
with:
92-
arduino-board-fqbn: ${{ matrix.platform }}:${{ matrix.archi }}:${{ matrix.board }}
93-
arduino-platform: ${{ matrix.platform }}:${{ matrix.archi }}@${{ matrix.platform-version }}
94-
platform-url: ${{ matrix.platform-url }}
95-
required-libraries: ${{ env.REQUIRED_LIBRARIES }}
96-
extra-arduino-cli-args: ${{ matrix.cli-args }}
97-
#build-properties: ${{ toJson(matrix.build-properties) }}
98-
sketch-names: ${{ matrix.sketch }}.ino
99-
sketch-names-find-start: ${{ env.SKETCH_NAMES_FIND_START }}/${{ matrix.unit }}
100-
#sketches-exclude: ${{ matrix.sketches-exclude }}
103+
fqbn: ${{ matrix.platform }}:${{ matrix.archi }}:${{ matrix.board }}
104+
platforms: |
105+
- name: ${{ matrix.platform }}:${{ matrix.archi }}
106+
source-url: ${{ matrix.platform-url }}
107+
version: ${{ matrix.platform-version }}
108+
libraries: ${{ steps.libs.outputs.yaml }}
109+
sketch-paths: |
110+
- ${{ env.SKETCH_NAMES_FIND_START }}/${{ matrix.unit }}/${{ matrix.sketch }}

.github/workflows/arduino-esp-v3-build-check.yml

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,28 @@ on:
1212
branches:
1313
- '*'
1414
paths:
15-
- 'src/unit/**.cpp'
16-
- 'src/unit/**.hpp'
17-
- 'src/unit/**.h'
18-
- 'src/unit/**.c'
15+
- 'src/**.cpp'
16+
- 'src/**.hpp'
17+
- 'src/**.h'
18+
- 'src/**.c'
1919
- 'examples/UnitUnified/**.ino'
2020
- 'examples/UnitUnified/**.cpp'
2121
- 'examples/UnitUnified/**.hpp'
2222
- 'examples/UnitUnified/**.h'
2323
- 'examples/UnitUnified/**.c'
24-
- '**arduino-esp-v3-build-check.yml'
24+
- '.github/workflows/arduino-esp-v3-build-check.yml'
2525
pull_request:
2626
paths:
27-
- 'src/unit/**.cpp'
28-
- 'src/unit/**.hpp'
29-
- 'src/unit/**.h'
30-
- 'src/unit/**.c'
27+
- 'src/**.cpp'
28+
- 'src/**.hpp'
29+
- 'src/**.h'
30+
- 'src/**.c'
3131
- 'examples/UnitUnified/**.ino'
3232
- 'examples/UnitUnified/**.cpp'
3333
- 'examples/UnitUnified/**.hpp'
3434
- 'examples/UnitUnified/**.h'
3535
- 'examples/UnitUnified/**.c'
36-
- '**arduino-esp-v3-build-check.yml'
36+
- '.github/workflows/arduino-esp-v3-build-check.yml'
3737
workflow_dispatch:
3838

3939
defaults:
@@ -105,16 +105,26 @@ jobs:
105105
- name: Checkout
106106
uses: actions/checkout@v4
107107

108-
# Build
108+
- name: Prepare libraries list
109+
id: libs
110+
run: |
111+
{
112+
echo "yaml<<EOF"
113+
echo "$REQUIRED_LIBRARIES" | tr ',' '\n' | while read -r lib; do
114+
echo "- name: $lib"
115+
done
116+
echo "- source-path: ./"
117+
echo "EOF"
118+
} >> "$GITHUB_OUTPUT"
119+
109120
- name: Compile examples
110-
uses: ArminJo/arduino-test-compile@master
121+
uses: arduino/compile-sketches@v1
111122
with:
112-
arduino-board-fqbn: ${{ matrix.platform }}:${{ matrix.archi }}:${{ matrix.board }}
113-
arduino-platform: ${{ matrix.platform }}:${{ matrix.archi }}@${{ matrix.platform-version }}
114-
platform-url: ${{ matrix.platform-url }}
115-
required-libraries: ${{ env.REQUIRED_LIBRARIES }}
116-
extra-arduino-cli-args: ${{ matrix.cli-args }}
117-
#build-properties: ${{ toJson(matrix.build-properties) }}
118-
sketch-names: ${{ matrix.sketch }}.ino
119-
sketch-names-find-start: ${{ env.SKETCH_NAMES_FIND_START }}/${{ matrix.unit }}
120-
#sketches-exclude: ${{ matrix.sketches-exclude }}
123+
fqbn: ${{ matrix.platform }}:${{ matrix.archi }}:${{ matrix.board }}
124+
platforms: |
125+
- name: ${{ matrix.platform }}:${{ matrix.archi }}
126+
source-url: ${{ matrix.platform-url }}
127+
version: ${{ matrix.platform-version }}
128+
libraries: ${{ steps.libs.outputs.yaml }}
129+
sketch-paths: |
130+
- ${{ env.SKETCH_NAMES_FIND_START }}/${{ matrix.unit }}/${{ matrix.sketch }}

.github/workflows/arduino-m5-build-check.yml

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,28 @@ on:
1212
branches:
1313
- '*'
1414
paths:
15-
- 'src/unit/**.cpp'
16-
- 'src/unit/**.hpp'
17-
- 'src/unit/**.h'
18-
- 'src/unit/**.c'
19-
- 'test/**.cpp'
20-
- 'test/**.hpp'
21-
- 'test/**.h'
22-
- 'test/**.c'
15+
- 'src/**.cpp'
16+
- 'src/**.hpp'
17+
- 'src/**.h'
18+
- 'src/**.c'
2319
- 'examples/UnitUnified/**.ino'
2420
- 'examples/UnitUnified/**.cpp'
2521
- 'examples/UnitUnified/**.hpp'
2622
- 'examples/UnitUnified/**.h'
2723
- 'examples/UnitUnified/**.c'
28-
- '**arduino-m5-build-check.yml'
24+
- '.github/workflows/arduino-m5-build-check.yml'
2925
pull_request:
3026
paths:
31-
- 'src/unit/**.cpp'
32-
- 'src/unit/**.hpp'
33-
- 'src/unit/**.h'
34-
- 'src/unit/**.c'
35-
- 'test/**.cpp'
36-
- 'test/**.hpp'
37-
- 'test/**.h'
38-
- 'test/**.c'
27+
- 'src/**.cpp'
28+
- 'src/**.hpp'
29+
- 'src/**.h'
30+
- 'src/**.c'
3931
- 'examples/UnitUnified/**.ino'
4032
- 'examples/UnitUnified/**.cpp'
4133
- 'examples/UnitUnified/**.hpp'
4234
- 'examples/UnitUnified/**.h'
4335
- 'examples/UnitUnified/**.c'
44-
- '**arduino-m5-build-check.yml'
36+
- '.github/workflows/arduino-m5-build-check.yml'
4537
workflow_dispatch:
4638

4739
defaults:
@@ -121,16 +113,26 @@ jobs:
121113
- name: Checkout
122114
uses: actions/checkout@v4
123115

124-
# Build
116+
- name: Prepare libraries list
117+
id: libs
118+
run: |
119+
{
120+
echo "yaml<<EOF"
121+
echo "$REQUIRED_LIBRARIES" | tr ',' '\n' | while read -r lib; do
122+
echo "- name: $lib"
123+
done
124+
echo "- source-path: ./"
125+
echo "EOF"
126+
} >> "$GITHUB_OUTPUT"
127+
125128
- name: Compile examples
126-
uses: ArminJo/arduino-test-compile@master
129+
uses: arduino/compile-sketches@v1
127130
with:
128-
arduino-board-fqbn: ${{ matrix.platform }}:${{ matrix.archi }}:${{ matrix.board }}
129-
arduino-platform: ${{ matrix.platform }}:${{ matrix.archi }}@${{ matrix.platform-version }}
130-
platform-url: ${{ matrix.platform-url }}
131-
required-libraries: ${{ env.REQUIRED_LIBRARIES }}
132-
extra-arduino-cli-args: ${{ matrix.cli-args }}
133-
#build-properties: ${{ toJson(matrix.build-properties) }}
134-
sketch-names: ${{ matrix.sketch }}.ino
135-
sketch-names-find-start: ${{ env.SKETCH_NAMES_FIND_START }}/${{ matrix.unit }}
136-
#sketches-exclude: ${{ matrix.sketches-exclude }}
131+
fqbn: ${{ matrix.platform }}:${{ matrix.archi }}:${{ matrix.board }}
132+
platforms: |
133+
- name: ${{ matrix.platform }}:${{ matrix.archi }}
134+
source-url: ${{ matrix.platform-url }}
135+
version: ${{ matrix.platform-version }}
136+
libraries: ${{ steps.libs.outputs.yaml }}
137+
sketch-paths: |
138+
- ${{ env.SKETCH_NAMES_FIND_START }}/${{ matrix.unit }}/${{ matrix.sketch }}

.github/workflows/clang-format-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
- '**.h'
1818
- '**.c'
1919
- '**.inl'
20-
- '**clang-format-check.yml'
20+
- '.github/workflows/clang-format-check.yml'
2121
- '**.clang-format'
2222
pull_request:
2323
paths:
@@ -27,7 +27,7 @@ on:
2727
- '**.h'
2828
- '**.c'
2929
- '**.inl'
30-
- '**clang-format-check.yml'
30+
- '.github/workflows/clang-format-check.yml'
3131
- '**.clang-format'
3232
workflow_dispatch:
3333

.github/workflows/platformio-build-check.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,30 @@ on:
88
branches:
99
- '*'
1010
paths:
11-
- 'src/unit/**.cpp'
12-
- 'src/unit/**.hpp'
13-
- 'src/unit/**.h'
14-
- 'src/unit/**.c'
11+
- 'src/**.cpp'
12+
- 'src/**.hpp'
13+
- 'src/**.h'
14+
- 'src/**.c'
1515
- 'examples/UnitUnified/**.ino'
1616
- 'examples/UnitUnified/**.cpp'
1717
- 'examples/UnitUnified/**.hpp'
1818
- 'examples/UnitUnified/**.h'
1919
- 'examples/UnitUnified/**.c'
20-
- '**/platformio-build-check.yml'
21-
- '**platformio.ini'
20+
- '.github/workflows/platformio-build-check.yml'
21+
- 'platformio.ini'
2222
pull_request:
2323
paths:
24-
- 'src/unit/**.cpp'
25-
- 'src/unit/**.hpp'
26-
- 'src/unit/**.h'
27-
- 'src/unit/**.c'
24+
- 'src/**.cpp'
25+
- 'src/**.hpp'
26+
- 'src/**.h'
27+
- 'src/**.c'
2828
- 'examples/UnitUnified/**.ino'
2929
- 'examples/UnitUnified/**.cpp'
3030
- 'examples/UnitUnified/**.hpp'
3131
- 'examples/UnitUnified/**.h'
3232
- 'examples/UnitUnified/**.c'
33-
- '**/platformio-build-check.yml'
34-
- '**platformio.ini'
33+
- '.github/workflows/platformio-build-check.yml'
34+
- 'platformio.ini'
3535
workflow_dispatch:
3636

3737
defaults:
@@ -121,6 +121,14 @@ jobs:
121121
- name: Checkout
122122
uses: actions/checkout@v4
123123

124+
- name: Set up Python
125+
uses: actions/setup-python@v5
126+
with:
127+
python-version: '3.10'
128+
129+
- name: Install intelhex
130+
run: pip install intelhex
131+
124132
- name: Build examples
125133
uses: karniv00l/platformio-run-action@v1
126134
with:

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,24 @@
3030
*.exe
3131
*.out
3232
*.app
33+
34+
# Doxygen
35+
docs/html/
36+
37+
# PlatformIO
38+
.pio/
39+
40+
# IDE
41+
.vscode/
42+
43+
# macOS
44+
.DS_Store
45+
46+
# Temporary
47+
tmp/
48+
49+
# Secrets
50+
.env*
51+
*.pem
52+
*.key
53+
*.cert

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,17 @@ See also examples using conventional methods here.
4242
- [M5Unit-HUB - MIT](LICENSE)
4343

4444
## Examples
45+
### PaHub
4546
See also [examples/UnitUnified](examples/UnitUnified)
4647

48+
### PbHub
49+
The following units support connection via PbHub using the GPIO adapter.
50+
Each unit library contains a `ViaPbHub` example demonstrating usage through PbHub.
51+
52+
| Unit | Library | Features used |
53+
|------|---------|---------------|
54+
| [UnitTubePressure](https://github.com/m5stack/M5Unit-TUBE) | M5Unit-TUBE | Analog read |
55+
4756
## Doxygen document
4857
[GitHub Pages](https://m5stack.github.io/M5Unit-HUB/)
4958

library.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "M5Unit-HUB",
3-
"description": "Library for M5Stack UNIT HUB Using M5UnitUnified",
4-
"keywords": "M5Stack UNIT HUB, M5UnitUnified",
3+
"description": "Library for M5Stack UNIT HUB using M5UnitUnified",
4+
"keywords": "m5stack, m5unitunified, pahub, pbhub, pca9548ap, i2c, multiplexer, hub",
55
"authors": {
66
"name": "M5Stack",
7-
"url": "http://www.m5stack.com"
7+
"url": "https://www.m5stack.com"
88
},
99
"repository": {
1010
"type": "git",
@@ -13,7 +13,7 @@
1313
"dependencies": {
1414
"m5stack/M5UnitUnified": ">=0.4.4"
1515
},
16-
"version": "0.3.0",
16+
"version": "0.3.1",
1717
"frameworks": [
1818
"arduino"
1919
],

library.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name=M5Unit-HUB
2-
version=0.3.0
2+
version=0.3.1
33
author=M5Stack
44
maintainer=M5Stack
55
sentence=Library for M5Stack UNIT HUB using M5UnitUnified
6-
paragraph=
6+
paragraph=Supports PaHub (PCA9548AP, I2C mux) and PbHub (STM32F030, Port.B expander).
77
category=Device Control
88
url=https://github.com/m5stack/M5Unit-HUB
99
architectures=esp32

0 commit comments

Comments
 (0)