lancaster-university / microbit-dal

http://lancaster-university.github.io/microbit-docs
Other
256 stars 130 forks source link

serial readUntil not working as expected #480

Open martinwork opened 3 years ago

martinwork commented 3 years ago

With the code

    while (1) {
        ManagedString in = uBit.serial.readUntil(":");
        ManagedString out = "|" + in + "#\n";
        uBit.serial.send(out);
        uBit.sleep(100);
    }

sending ab:cd:ef:, V2 works as expected, returning

|ab#
|cd#
|ef#

but V1 returns

|ab:c#
|#
|ef#

Sample source and hex files serial-readuntil.zip