Skip to content

Commit ec63d4c

Browse files
authored
Add files via upload
1 parent f75a73d commit ec63d4c

File tree

4 files changed

+74
-26
lines changed

4 files changed

+74
-26
lines changed

FreqPeriodCounter.cpp

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
/* FreqPeriodCounter
2-
* Version 28-5-2013
3-
* Copyright (C) 2011 Albert van Dalen http://www.avdweb.nl
4-
*
5-
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
6-
* as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
7-
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
8-
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
9-
* You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses
1+
/*
2+
FreqPeriodCounter
3+
Copyright (C) 2012 Albert van Dalen http://www.avdweb.nl
4+
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
5+
as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
7+
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License at http://www.gnu.org/licenses .
108
11-
Release Notes
12-
17-12-2011 timeFunctionPtr to select millis or micros instead of bool variable
13-
17-12-2011 New function ready()
14-
22-04-2012 poll() counts all transients instead of low-high transients
15-
5-5-2013 if(transientCount >= 2) // the first 2 measurements are invalid
16-
28-5-2013 measurements are valid from start, added synchronize()
17-
7-2-2017 Versatile by omitting the input pin, added poll(bool _level) and added constructor
9+
AUTHOR: Albert van Dalen
10+
WEBSITE: http://www.avdweb.nl/arduino/libraries/frequency-period-counter.html
11+
12+
HISTORY:
13+
1.0.0 17-12-2011 timeFunctionPtr to select millis or micros instead of bool variable
14+
1.0.1 17-12-2011 New function ready()
15+
1.0.2 22-04-2012 poll() counts all transients instead of low-high transients
16+
1.0.3 5-5-2013 if(transientCount >= 2) // the first 2 measurements are invalid
17+
1.0.4 28-5-2013 measurements are valid from start, added synchronize()
18+
1.0.5 7-2-2017 Versatile by omitting the input pin, added poll(bool _level) and added constructor
1819
1920
2021
<------------- period ------------>

FreqPeriodCounter.h

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1+
/*
2+
FreqPeriodCounter
3+
Copyright (C) 2012 Albert van Dalen http://www.avdweb.nl
4+
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
5+
as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
7+
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License at http://www.gnu.org/licenses .
8+
9+
AUTHOR: Albert van Dalen
10+
WEBSITE: http://www.avdweb.nl/arduino/libraries/frequency-period-counter.html
11+
*/
12+
113
#ifndef FREQPERIODCOUNTER_H
214
#define FREQPERIODCOUNTER_H
315

4-
/* FreqPeriodCounter
5-
* Copyright (C) 2011 Albert van Dalen http://www.avdweb.nl
6-
*
7-
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
8-
* as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
9-
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
10-
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11-
* You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses
12-
*/
13-
1416
#include <Arduino.h>
1517

1618
class FreqPeriodCounter

keywords.txt

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#######################################
2+
# Syntax coloring map for FreqPeriodCounter
3+
#######################################
4+
5+
#######################################
6+
# Datatypes (KEYWORD1)
7+
#######################################
8+
9+
FreqPeriodCounter KEYWORD1
10+
11+
#######################################
12+
# Methods and Functions (KEYWORD2)
13+
#######################################
14+
15+
poll KEYWORD2
16+
synchronize KEYWORD2
17+
ready KEYWORD2 KEYWORD2
18+
hertz KEYWORD2 KEYWORD2
19+
period KEYWORD2
20+
pulseWidth KEYWORD2
21+
pulseWidthLow KEYWORD2
22+
elapsedTime KEYWORD2
23+
level KEYWORD2
24+
25+
#######################################
26+
# Instances (KEYWORD2)
27+
#######################################
28+
29+
#######################################
30+
# Constants (LITERAL1)
31+
#######################################
32+

library.properties

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name=FreqPeriodCounter
2+
version=1.0.5
3+
author=Albert van Dalen
4+
maintainer=Albert van Dalen <[email protected]>
5+
sentence=Smart library with extensive functions for counting (multiple) frequencies. For Arduino Uno and Zero.
6+
paragraph=Built-in debounce. The measurement can be done in milli seconds or micro seconds.
7+
category=Timing
8+
url=https://github.com/avandalen/avdweb_FreqPeriodCounter
9+
architectures=avr, sam
10+
11+
12+
13+

0 commit comments

Comments
 (0)