https://github.com/eadf/esp8266_tachometer
A simple tachometer
https://github.com/eadf/esp8266_tachometer
Last synced: 23 days ago
JSON representation
A simple tachometer
- Host: GitHub
- URL: https://github.com/eadf/esp8266_tachometer
- Owner: eadf
- License: gpl-3.0
- Created: 2015-02-21T09:15:55.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-02T16:58:13.000Z (over 11 years ago)
- Last Synced: 2025-03-02T18:19:14.069Z (over 1 year ago)
- Language: C
- Size: 184 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# esp8266_tachometer
A simple tachometer implementation. This used to be a sub-module in [another project](https://github.com/eadf/esp8266_digoleserial).
It works by setting up a periodic timer and an interrupt.
The interrupt increases a counter each time the GPIO alters state.
The timer calculates the number of alternations over time and presents the frequency [Hz] to the 'clients'.
###Public API
Setup the GPIO,interrupt and timer:
```void tachometer_init(uint8_t ioPin);```
Returns the frequency from the last timer period:
```uint32_t tachometer_getSample(void);```
###Example
See [esp8266_digoleserial demo.](https://github.com/eadf/esp8266_digoleserial)
###Todo
* remove hardcoded timer period
* Implementation uses global static data so there can only be on call to ```tachometer_init()```