• The sample is long enough to fill 3 buffers (30 kbytes should fill 15 buffers of 2048 bytes). Note that this code comes from the original Espruino documentation. Even if I copy it without any changes (such as the button interface), I get that problem. The JavaScript should be fine and it looks fine to me... so the problem is perhaps rooted even deeper (in the firmware, on a level below the JS interpreter)?

    I don't know what happens under the hood, so I can only speculate, but is it possible that something (reading from the SD?) is slowing down the waveform output loop (hence the lower output frequency) and then some regulative code in the firmware compares the actual output position to the supposed one and speeds up the output in order to "catch up" (hence the higher output frequency)?

    Not sure if it matters, but I have a bluetooth module soldered onto the board (which I am not using at the same time)

About

Avatar for Dennis @Dennis started