Skip to content

uart.read([nbytes]) triggers OS Error 11 when the buffer doesn't have the requested characters ready #45

Closed
@martinwork

Description

@martinwork

uart.read([nbytes]) triggers OS Error 11 when the buffer doesn't have enough characters ready.

Tested with Mu and 967c076

from microbit import *
import time

uart.init(baudrate=115200)

display.show("A")
sleep(200)

read_time0 =  time.ticks_ms()
bytes_in = uart.read(1)
read_time1 =  time.ticks_ms()

display.show("B")
sleep(200)

display.show(read_time1-read_time0)

while True:
    sleep(0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions