Changed variable sampleRate and periodUs to float to avoid rounding errors when generating frequencies so that tones played via the microbit v2 internal speaker are now more accurate to the target frequency, during testing only 0.1-0.4hz out, which could be due to innacuracy in the detection equipment.
This pull request mirrors and relies on lancaster-university/codal-microbit-v2 repo of the same name
Changed variable sampleRate and periodUs to float to avoid rounding errors when generating frequencies so that tones played via the microbit v2 internal speaker are now more accurate to the target frequency, during testing only 0.1-0.4hz out, which could be due to innacuracy in the detection equipment.
This pull request mirrors and relies on lancaster-university/codal-microbit-v2 repo of the same name