bbcmicrobit / micropython

Port of MicroPython for the BBC micro:bit
https://microbit-micropython.readthedocs.io
Other
603 stars 284 forks source link

Micro:Bit freeze when analog read #716

Closed ardaij closed 3 years ago

ardaij commented 3 years ago

Hi,

In our school, we programming micro:bits in MicroPython. For analog reading, the microbit freezes at irregular intervals.

The error can be reproduced with this code:

`from microbit import *

light = False

while True: pin1.read_analog() display.set_pixel(2, 2, 5 if light else 0) light = not light sleep(200)`

We use microbit v2 microcontrollers: MicroPython v1.13 on 2021-03-16; micro:bit v2.0.0-beta.5 with nRF52833 We tested this with 7 of the same Micro:Bits.

Please help us.

Thanks