Skip to content

Commit 0f8a579

Browse files
committed
update GitHub actions
1 parent 19c4408 commit 0f8a579

13 files changed

Lines changed: 61 additions & 38 deletions

File tree

.github/workflows/arduino-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ jobs:
66
runs-on: ubuntu-latest
77
timeout-minutes: 5
88
steps:
9-
- uses: actions/checkout@v4
10-
- uses: arduino/arduino-lint-action@v1
9+
- uses: actions/checkout@v5
10+
- uses: arduino/arduino-lint-action@v2
1111
with:
1212
library-manager: update
1313
compliance: strict

.github/workflows/arduino_test_runner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
timeout-minutes: 20
99

1010
steps:
11-
- uses: actions/checkout@v4
11+
- uses: actions/checkout@v5
1212
- uses: ruby/setup-ruby@v1
1313
with:
1414
ruby-version: 2.6

.github/workflows/jsoncheck.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ on:
55
paths:
66
- '**.json'
77
pull_request:
8+
paths:
9+
- '**.json'
810

911
jobs:
1012
test:
1113
runs-on: ubuntu-latest
1214
timeout-minutes: 5
1315
steps:
14-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1517
- name: json-syntax-check
1618
uses: limitusus/json-syntax-check@v2
1719
with:

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

88

9+
## [0.2.7] - 2025-09-09
10+
- update GitHub actions
11+
- minor edits
12+
913
## [0.2.6] - 2023-11-14
1014
- update readme.md
1115

12-
1316
## [0.2.5] - 2023-02-08
1417
- update readme.md
1518
- fix keywords.txt

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017-2024 Rob Tillaart
3+
Copyright (c) 2017-2025 Rob Tillaart
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ The nibbleArray is an array that stores 2 nibbles in a byte therefore it is
2323
twice as small as a normal array.
2424

2525
The current implementation can hold 510 elements. This is due a limitation of
26-
the UNO which can **allocate** max 255 bytes in one **malloc()** call.
26+
the UNO R3 which can **allocate** max 255 bytes in one **malloc()** call.
2727

2828
This **NIBBLEARRAY_MAXSIZE** can be defined compile time "-D NIBBLEARRAY_MAXSIZE"
2929
or one can adjust it in the library if other platforms can allocate more memory.
3030

3131

32-
#### Related
32+
### Related
3333

3434
The BitArray library is one from a set of three:
3535

@@ -44,14 +44,14 @@ The BitArray library is one from a set of three:
4444
#include "nibbleArray.h"
4545
```
4646

47-
#### Constructor
47+
### Constructor
4848

4949
- **nibbleArray(uint16_t size)** constructor
5050
- **uint16_t size()** returns the size of the array.
5151
- **uint16_t memory()** returns the memory used in bytes.
5252

5353

54-
#### Base
54+
### Base
5555

5656
- **uint8_t set(uint16_t index, uint8_t value)** set a value in the nibbleArray.
5757
Index must be in range otherwise 0xFF = NIBBLEARRAY_ERROR_INDEX will be returned.

examples/nibbleArray_demo/nibbleArray_demo.ino

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// FILE: nibbleArray_demo.ino
33
// AUTHOR: Rob Tillaart
44
// PURPOSE: demo nibble array
5-
// DATE: 2020-06-21
65
// URL: https://github.com/RobTillaart/nibbleArray
76

87

@@ -14,9 +13,11 @@ nibbleArray na(500);
1413
void setup()
1514
{
1615
Serial.begin(115200);
16+
Serial.println();
1717
Serial.println(__FILE__);
1818
Serial.print("NIBBLEARRAY_LIB_VERSION: ");
1919
Serial.println(NIBBLEARRAY_LIB_VERSION);
20+
Serial.println();
2021

2122
test_1();
2223

@@ -31,13 +32,13 @@ void test_1()
3132

3233
na.clear();
3334

34-
// 500 throws with 3 dices (3..18 ==> 0..15)
35+
// 500 throws with 3 dices (3..18 ==> 0..15)
3536
for (int i = 0; i < 500; i++)
3637
{
37-
uint8_t sum = random(6); // 0..5
38+
uint8_t sum = random(6); // 0..5
3839
sum += random(6);
3940
sum += random(6);
40-
na.set(i, sum); // diff from na.set(i, random(16));
41+
na.set(i, sum); // diff from na.set(i, random(16));
4142
}
4243

4344
for (int i = 0; i < 500; i++)
@@ -54,7 +55,7 @@ void test_1()
5455
{
5556
Serial.print(i);
5657
Serial.print("\t");
57-
// for (int p = 0; p < ar[i]; p++) Serial.print(">");
58+
// for (int p = 0; p < ar[i]; p++) Serial.print(">");
5859
Serial.print(ar[i]);
5960
Serial.println();
6061
}
@@ -73,17 +74,17 @@ void test_1()
7374
{
7475
uint8_t octave = na.get(i++);
7576
uint8_t note = na.get(i++);
76-
uint8_t duration = na.get(i++); // in 1/16th
77+
uint8_t duration = na.get(i++); // in 1/16th
7778
play(octave, note, duration);
78-
// sendMIDI(note, duration);
79+
// sendMIDI(note, duration);
7980
}
8081
}
8182

8283

8384
void play(uint8_t octave, uint8_t note, uint8_t duration)
8485
{
8586
Serial.print("Play: ");
86-
// Serial.print(octave);
87+
// Serial.print(octave);
8788
Serial.print(" ");
8889
switch (note)
8990
{
@@ -146,5 +147,5 @@ void loop()
146147
}
147148

148149

149-
// -- END OF FILE --
150+
// -- END OF FILE --
150151

examples/nibbleArray_performance/nibbleArray_performance.ino

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
// FILE: nibbleArray_performance.ino
33
// AUTHOR: Rob Tillaart
44
// PURPOSE: demo performance nibble array
5-
// DATE: 2020-06-21
65
// URL: https://github.com/RobTillaart/nibbleArray
76

87

98
#include "nibbleArray.h"
109

1110

12-
// AVR UNO can handle only 510
13-
// ESP32 can do more but depends on RTOS limits
11+
// AVR UNO can handle only 510
12+
// ESP32 can do more but depends on RTOS limits
13+
1414

1515
#define NA_SIZE 500
1616

@@ -23,13 +23,16 @@ volatile long x = 0;
2323
void setup()
2424
{
2525
Serial.begin(115200);
26+
Serial.println();
2627
Serial.println(__FILE__);
2728
Serial.print("NIBBLEARRAY_LIB_VERSION: ");
2829
Serial.println(NIBBLEARRAY_LIB_VERSION);
30+
Serial.println();
31+
delay(100);
2932

30-
// performance tests are run first once in a loop
31-
// then twice in a loop, so the difference is without
32-
// the loop overhead.
33+
// performance tests are run first once in a loop
34+
// then twice in a loop, so the difference is without
35+
// the loop overhead.
3336
test_size();
3437
test_get();
3538
test_set();
@@ -42,6 +45,10 @@ void setup()
4245

4346
void test_size()
4447
{
48+
Serial.println();
49+
Serial.println(__FUNCTION__);
50+
delay(10);
51+
4552
Serial.print("Nibble array size:\t");
4653
Serial.println(na.size());
4754
Serial.print("Nibble array mem:\t");
@@ -52,8 +59,10 @@ void test_size()
5259

5360
void test_get()
5461
{
55-
Serial.println("\nget");
62+
Serial.println();
63+
Serial.println(__FUNCTION__);
5664
delay(10);
65+
5766
start = micros();
5867
for (uint16_t i = 0; i < na.size(); i++)
5968
{
@@ -85,8 +94,10 @@ void test_get()
8594

8695
void test_set()
8796
{
88-
Serial.println("\nset");
97+
Serial.println();
98+
Serial.println(__FUNCTION__);
8999
delay(10);
100+
90101
start = micros();
91102
for (uint16_t i = 0; i < na.size(); i++)
92103
{
@@ -116,8 +127,10 @@ void test_set()
116127

117128
void test_clear()
118129
{
119-
Serial.println("\nclear");
130+
Serial.println();
131+
Serial.println(__FUNCTION__);
120132
delay(10);
133+
121134
start = micros();
122135
na.clear();
123136
stop = micros();
@@ -136,6 +149,7 @@ void test_clear()
136149
Serial.print("DELTA:\t\t");
137150
Serial.println(d2 - d1);
138151
delay(100);
152+
139153
for (uint16_t i = 0; i < na.size(); i++)
140154
{
141155
if (na.get(i) != 0)
@@ -149,15 +163,18 @@ void test_clear()
149163

150164
void test_setAll()
151165
{
152-
Serial.println("\nsetAll");
166+
Serial.println();
167+
Serial.println(__FUNCTION__);
153168
delay(10);
169+
154170
start = micros();
155171
na.setAll(1);
156172
stop = micros();
157173
Serial.print("DURATION:\t");
158174
d1 = stop - start;
159175
Serial.println(d1);
160176
delay(100);
177+
161178
for (uint16_t i = 0; i < na.size(); i++)
162179
{
163180
if (na.get(i) != 1)

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"type": "git",
1616
"url": "https://github.com/RobTillaart/nibbleArray.git"
1717
},
18-
"version": "0.2.6",
18+
"version": "0.2.7",
1919
"license": "MIT",
2020
"frameworks": "*",
2121
"platforms": "*",

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=NibbleArray
2-
version=0.2.6
2+
version=0.2.7
33
author=Rob Tillaart <rob.tillaart@gmail.com>
44
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
55
sentence=Library to implement a compact array of nibbles (4 bit).

0 commit comments

Comments
 (0)