Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple readings return double, triple... of the original frequency #36

Open
badomenspeaking opened this issue Sep 23, 2024 · 0 comments

Comments

@badomenspeaking
Copy link

Description

Steps To Reproduce Problem

Compiled and running. Read pulses from frequency generated from another Arduino UNO with the FastPwmPin library.

First reading is always OK. next readings return 2, 3, 4,... times the original reading...

Hardware & Software

Board: Arduino NANO with ATMega328P + IC: ICM7217 4-digit 7-segment driver
Arduino IDE version: 1.8.19
Version info & package name (from Tools > Boards > Board Manager): Arduino Nano
Operating system & version: Windows 10

Arduino Sketch

#include <FreqCount.h>
#include "ICM7217.h"

void setup() {
ICM7217_init();
FreqCount.begin(1000);
}

void loop() {

if (FreqCount.available()) {
unsigned long count = FreqCount.read();
uint16_t f = count;
ICM7217_pulses(f);
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant