Clock not fast enough

Is it possible to run a clock loop with a timer interval lower than 1? I need to run a loop faster than every 1000 ms.

The fastest you can hope for is somewhere between 25ms and 50ms, this is faster than 1000ms.

If you enter 1ms, the clock will probably operate at 25ms - 50ms, depending on your hardware.

2 Likes

Sorry I mean faster than 1 ms. I might misunderstand the concept, but I need to send about 40,000 numbers a second to my arduino via bluetooth. I want to detect the frequencies in my phone microphone.
As far as I understand the sampling rate needs to be this high to determine what frequencies the sound consists of.

I am fairly certain this will not be possible, happy to be proven wrong by others though :wink:

3 Likes

It will operate at the highest speed of the phone. Some new phones will be quicker, while other phones will be slower. There is no guarantee that this will be in a particular speed for one millisecond.

1 Like

but as demonstrated here:

4 Likes

How were you planning to capture the phone microphone data?

1 Like

I already captured microphone data with this extension https://community.thunkable.com/t/extension-get-level-sound-microphone/45689. The problem is that a typical microphone has a sample rate of 44.1 kHz, meaning it records 44100 samples of sound level every second. The problem is that in mit app inventor I can only save about 20-70 samples every second, which is no way near 44100 samples a second. I am not very familiar with extensions. Is it possible to view or edit the code of extensions?

You are using the wrong extension.
At that same post https://community.thunkable.com/t/extension-get-level-sound-microphone/45689 there is an extension to capture the Fourier transfrom, which gives you the frequencies already pre-cooked.

The frequencies vary much more slowly than the instantaneous sound pressure on the microphone.

KIO4.com already did most of your work for you.

1 Like

What kind of microphone are you talking about?
Certainly not from a typical condenser (studio) microphone.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.