Frequency counter

Hello,

I’m new here and the software looks very promising. I am looking for an implementation of a frequency counter to finalize a simple project. Has this been done before? Sorry if this is not allowed in the chat.

Richard

Hello and welcome! Sorry for the late reply.

There’s no node in the standard library to count incoming pulses. Although this should be technically possible, frequency counting is not trivial because it involves setting up hardware interrupts. Hardware interrupts are global and the nodes are local. A trick to transfer data will be required.

If the frequency you want to count is 10s of Hz things are simpler and https://xod.io/libs/nkrkv/encoder/ might be used as a basis.

What piece of hardware are you trying to manage with the pulse counting?

Total newbie here… can the FreqCount and/or FreqMeasure libraries be used with XOD?

https://www.pjrc.com/teensy/td_libs_FreqCount.html

Not directly, but you can wrap the code to create a new node that uses the library. See https://xod.io/docs/guide/wrapping-arduino-libraries/

There has also been on-going discussions about test code that will auto-generate nodes for libraries to give a 1st draft that can then be cleaned up.