# Micro:bit analog read is agonizingly slow?

**URL:** <https://forum.makecode.com/t/micro-bit-analog-read-is-agonizingly-slow/22028>\
**Category:** micro:bit\
**Created:** [August 24, 2023, 6:39am UTC](https://forum.makecode.com/t/micro-bit-analog-read-is-agonizingly-slow/22028 "2023-08-24T06:39:35Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![bsiever](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bsiever/32/1032_2.png) [@bsiever](https://forum.makecode.com/u/bsiever)\
**Post date:** [August 28, 2023, 4:37pm UTC](https://forum.makecode.com/t/micro-bit-analog-read-is-agonizingly-slow/22028/5 "2023-08-28T16:37:56Z")

</div>

I think there’s a need for some sort of yield to avoid having other tasks starve, but I’m not sure about the choice of 20ms. Again, I wouldn’t be surprised if it was related to user experience for the most common uses.

One of the nice features of MakeCode is the ability to make extensions. I made an extension that provides “faster” loops: On the V2 one loop is about 250Hz (max) and the other can be 120,000Hz-150,000Hz (120-150 **k** Hz) . The URL is: [https://github.com/bsiever/pxt-fastloops](https://github.com/bsiever/pxt-fastloops) .

The `... more` menu has the block that can go 120-150 **k** Hz, but it will still occasionally `pause` to allow other tasks to run. I included the periodic `pause` to make starvation of other tasks a little less likely. I think misuse could be a problem. I’m not sure if the loop was the cause, but in one test I had trouble reprogramming the micro:bit over USB and had to use the file drag-and-drop approach.

Bill

---

_[View the full topic](https://forum.makecode.com/t/micro-bit-analog-read-is-agonizingly-slow/22028)._
