GithubHelp home page GithubHelp logo

schreibfaul1 / freqcountesp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kapraran/freqcountesp

0.0 0.0 0.0 33 KB

A frequency counter library for esp32

Home Page: https://kapraran.github.io/FreqCountESP/

License: MIT License

C++ 100.00%

freqcountesp's Introduction


FreqCountESP
FreqCountESP

A frequency counter library for esp32

Gitter

Table of Contents

About

A frequency counter library for esp32. It counts the numbers of pulses on a specified pin during a fixed time frame using native interrupts and timers. It only supports one instance per sketch for now.

Installation

To use this library you have to import it into Arduino IDE as follows:

  1. Download or clone this repository as a zip file.
  2. Go to "Sketch" > "Include Library" > "Add .ZIP library..." and select the zip file to import it.

Usage

Include the library in the sketch

#include "FreqCountESP.h"

Initialize the instance

Set which pin to use and the length of the time frame in milliseconds.

void setup()
{
  int inputPin = 14;
  int timerMs = 1000;
  FreqCountESP.begin(inputPin, timerMs);
}

Read the frequency

Wait for a new value to become available and read it by calling the read() method.

void loop()
{
  if (FreqCountESP.available())
  {
    uint32_t frequency = FreqCountESP.read();
    // Do something with the frequency...
  }
}

Credits

License

MIT License

Copyright (c) 2020 Nikos Kapraras

freqcountesp's People

Contributors

dpwe avatar kapraran avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.