Nice explanation on the changing of the sample frequency. Actually, I don't think it has to (or can) be more accurate. While testing with the MyDAQ in a range of 80 to 330 Hz the error didn't exceed 1 Hz. With a microphone it is a bit inaccurate in the 330 Hz region, but I think this is caused by hardware, since the software proved to work well. I'll play around with it and try to find the optimum buffer size. Next to that I'll take the average of multiple measurements and adapt the peak state machine to find the next correlation peak as well. As for the next step in the project, I'd like to add an OLED screen (with the Adafruit SSD1306 and GFX libraries). This requires I2C. Since I've read that the other analog ports are unusable during free running mode on one of them, I'd like to ask the following question: Do you expect that this will cause any problems? Or can I just simply turn the continuous sampling on and off in the readData function to use I2C on other ports?