Code for detecting frequency, reading user input and then sending motor commands to adjust the effective length of the flute (tube) until the desired input frequency is reached.
Project for the Embedded Control Project course at the University of Freiburg.
Big thanks to Johan Vonk for providing the source code to his Pitch Detection on Arduino project. When it came to the pitch detection, a significnat amount of the code we used comes from his ideas/work. Some changes had to be made in order for it to be compatiable with Arduino Due, such as re-configuring the Timer and ADC modules. You can view Johan's project at https://coertvonk.com/technology/embedded/arduino-pitch-detector-13252