Skip to content

Commit 793130c

Browse files
authored
update GitHub actions (#30)
* update license to 2023 * update GitHub actions
1 parent 891cd90 commit 793130c

File tree

11 files changed

+96
-11
lines changed

11 files changed

+96
-11
lines changed

.github/workflows/arduino-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
lint:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010
- uses: arduino/arduino-lint-action@v1
1111
with:
1212
library-manager: update

.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
runs-on: ubuntu-latest
99

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

.github/workflows/jsoncheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
test:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1414
- name: json-syntax-check
1515
uses: limitusus/json-syntax-check@v1
1616
with:

ACS712.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
//
22
// FILE: ACS712.cpp
33
// AUTHOR: Rob Tillaart, Pete Thompson
4-
// VERSION: 0.3.2
4+
// VERSION: 0.3.3
55
// DATE: 2020-08-02
66
// PURPOSE: ACS712 library - current measurement
7+
// URL: https://github.com/RobTillaart/ACS712
78

89

910
#include "ACS712.h"

ACS712.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22
//
33
// FILE: ACS712.h
44
// AUTHOR: Rob Tillaart, Pete Thompson
5-
// VERSION: 0.3.2
5+
// VERSION: 0.3.3
66
// DATE: 2020-08-02
77
// PURPOSE: ACS712 library - current measurement
8+
// URL: https://github.com/RobTillaart/ACS712
89
//
910
// Tested with a RobotDyn ACS712 20A breakout + UNO.
1011
//
1112

1213

1314
#include "Arduino.h"
1415

15-
#define ACS712_LIB_VERSION (F("0.3.2"))
16+
#define ACS712_LIB_VERSION (F("0.3.3"))
1617

1718

1819
// ACS712_FF_SINUS == 1.0/sqrt(2) == 0.5 * sqrt(2)

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
# Change Log AD520X
1+
# Change Log ACS712
22

33
All notable changes to this project will be documented in this file.
44

55
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.3.3] - 2023-03-01
10+
- update GitHub actions
11+
- update license
12+
- add example
13+
- add URL in .h .cpp
14+
15+
916
## [0.3.2] - 2022-11-18
1017
- fix #26 revert data type \_midPoint to int
1118
- Add CHANGELOG.md

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) 2020-2022 Rob Tillaart
3+
Copyright (c) 2020-2023 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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,10 +340,12 @@ The examples show the basic working of the functions.
340340

341341
## Future
342342

343+
#### Must
344+
345+
343346
#### Should - 0.3.x
344347

345348
- investigate noise suppression #21 (0.3.1 and later)
346-
- add external history file = changelog.md
347349

348350

349351
#### Could
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
//
2+
// FILE: ACS712_20_AC_midPoint_performance.ino
3+
// AUTHOR: Rob Tillaart
4+
// PURPOSE: demo to compare different midPoint methods.
5+
// URL: https://github.com/RobTillaart/ACS712
6+
7+
8+
#include "ACS712.h"
9+
10+
11+
// Arduino UNO has 5.0 volt with a max ADC value of 1023 steps
12+
// ACS712 5A uses 185 mV per A
13+
// ACS712 20A uses 100 mV per A
14+
// ACS712 30A uses 66 mV per A
15+
16+
17+
ACS712 ACS(A0, 5.0, 1023, 100);
18+
// ESP 32 example (might requires resistors to step down the logic voltage)
19+
// ACS712 ACS(25, 3.3, 4095, 185);
20+
21+
uint32_t start, stop;
22+
23+
float mp = 0;
24+
25+
26+
void setup()
27+
{
28+
Serial.begin(115200);
29+
while (!Serial);
30+
Serial.println(__FILE__);
31+
Serial.println();
32+
Serial.print("ACS712_LIB_VERSION: ");
33+
Serial.println(ACS712_LIB_VERSION);
34+
35+
Serial.println("Compare different midPoint methods.\n");
36+
37+
start = micros();
38+
mp = ACS.getMidPoint();
39+
stop = micros();
40+
Serial.print("Default: \t");
41+
Serial.print(mp);
42+
Serial.print("\t");
43+
Serial.println(stop - start);
44+
delay(10);
45+
46+
start = micros();
47+
mp = ACS.autoMidPoint();
48+
stop = micros();
49+
Serial.print("AutoMP: \t");
50+
Serial.print(mp);
51+
Serial.print("\t");
52+
Serial.println(stop - start);
53+
delay(10);
54+
55+
start = micros();
56+
uint16_t average = (ACS.getMinimum(20) + ACS.getMaximum(20)) / 2;
57+
stop = micros();
58+
Serial.print("Average: \t");
59+
Serial.print(average);
60+
Serial.print("\t");
61+
Serial.println(stop - start);
62+
delay(10);
63+
64+
Serial.println("\ndone...");
65+
}
66+
67+
68+
void loop()
69+
{
70+
delay(1000);
71+
}
72+
73+
74+
// -- END OF FILE --

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"type": "git",
2222
"url": "https://github.com/RobTillaart/ACS712.git"
2323
},
24-
"version": "0.3.2",
24+
"version": "0.3.3",
2525
"license": "MIT",
2626
"frameworks": "arduino",
2727
"platforms": "*",

0 commit comments

Comments
 (0)