Friday, 12 February 2016

Arduino Signal Experiment #3-A: Goertzel using Arduino

This is the third series of the Arduino Signal Experiment. Now we will be dwelving with Goertzel Algorithm. Before we go to the actual experiment (which I will be posting on the next blog), I will discuss the Goertzel library that we will be using this time. I searched for an Goertzel Library and I found this https://github.com/jacobrosenthal/Goertzel and from my initial experiment, this pretty worked well, however, I faced some hurdles when doing multiple tone detection. I therefore checked and forked the source code. After that, I did some modifications:
  • I added a ChangeParameter to be able to dynamically change the parameters, thus no need to re-sample again. This contains the code  that was initially on the constructor.
  • All the global variables on the cpp files were pushed to the header files, making them class level variables. This way, if I choose to make two instances of Goertzel, then those variables will be instantiated. But since I already used a ChangeParameter, this second option may be rarely used.
 You can get the forked source code here: https://github.com/fwswdev/Goertzel

No comments:

Post a Comment