This extension provides a forver loop that can repeat faster than the normal forever
loop.
fastForever.fastForever(handler: handler: () => void) : void
A fast forever loop. Top frequency is about 250Hz on the micro:bit V2, which is 5 time faster than the 50Hz of the regular forever
loop.
fastForver.fasterForever(time: number, handler: () => void) : void
A faster forever loop. Top frequency is about 150kHz on the micro:bit V2, which is 3,000 time faster than the 50Hz of the regular forever
loop.
The number
indicates how long (in milliseconds) between official pauses, which are needed to allow other tasks to run.
This loop can "starve" out all other code, including the fastForever
and vital system tasks.
Icon based on Font Awesome icon 0xF1DA SVG.
I develop micro:bit extensions in my spare time to support activities I'm enthusiastic about, like summer camps and science curricula. You are welcome to become a sponsor of my micro:bit work (one time or recurring payments), which helps offset equipment costs: here. Any support at all is greatly appreciated!
for PXT/microbit
pxt-fastloops=github:bsiever/pxt-fastloops