lancaster-university / codal-nrf52

MIT License
4 stars 15 forks source link

Fixing Inaccurate notes produced on Micro:bit v2 #21

Closed JoshuaAHill closed 3 years ago

JoshuaAHill commented 3 years ago

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

finneyj commented 3 years ago

Thanks @JoshuaAHill