Describe the bug
When an STM32 is connected via USB to Makecode and sending data with the function Serial.writeLine, sometimes nothing appears on the Makecode console.
code that sometimes does not display anything :
input.buttonD2.onEvent(ButtonEvent.Down, function () {
Serial.writeLine("Reaction time" + (control.millis() - timeTurnOn) + " ms");
newGame()
})
function newGame () {
pins.D4.digitalWrite(false)
pause(randint(1000, 5000))
timeTurnOn = control.millis()
pins.D4.digitalWrite(true)
}
let timeTurnOn = 0
Serial.attachToConsole()
newGame()
TODO : check the code to see difference between Serial.writeLine and Serial.writeValue
Describe the bug
When an STM32 is connected via USB to Makecode and sending data with the function Serial.writeLine, sometimes nothing appears on the Makecode console.
code that sometimes does not display anything :
TODO : check the code to see difference between Serial.writeLine and Serial.writeValue