Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • Hi @Hansom DIY, Welcome and nice to meet you. Ah, let me see.I think what you need is a simple pulse counter program. Counting a pulse is like using a GPIO pin in input mode to read a manual button switch and adding up the counts, so newbie friendly python is good enough to do the simple job. You might also like to try the python GPIO.zero module which is easy to use. You can find a simple demo program in GPIO.zero in the following thread: ihttps://www.raspberrypi.org/forums/viewtopic.php?t=214457. Happy python programming and cheers. Commented Feb 19, 2020 at 10:16
  • Hi @Hansom, good day and nice to see you again. I am terribly sorry to confess that I made a unforgivable typo error yesterday about the weblink on using GPIO.Zero to count pulses. The link should read like this: raspberrypi.org/forums/viewtopic.php?t=214457. May apologies for any confusion caused. Yours faithfully. Commented Feb 20, 2020 at 4:56
  • Interesting question, I think. Just an initial thought is this: The RPi GPIO and software is not a good choice for this task - a micro-controller will give you a better shot as it's nearer "real-time", but hardware is the "best" (IMHO) way to do this. Try to find an IC that performs a frequency-to-voltage conversion and has SPI... perhaps there's a "frquency counter" IC with SPI?? This part can probably do the job, but will require 8 GPIO lines & more effort to read as it has no SPI interface. Commented Mar 16, 2021 at 0:27