Open mmoskal opened 4 years ago
From https://github.com/microsoft/pxt-microbit/issues/2709
The following program blinks nicely until A is pressed. Then the release_fiber() seems to exit.
Joe, this is blocking on MakeCode side.
void onButton(MicroBitEvent e) { uBit.serial.send((uint8_t *)" ", 1); } void blink() { for (;;) { uBit.display.image.setPixelValue(0, 0, 255); fiber_sleep(100); uBit.display.image.setPixelValue(0, 0, 0); fiber_sleep(100); } } int main() { uBit.init(); uBit.messageBus.listen(MICROBIT_ID_BUTTON_A, MICROBIT_BUTTON_EVT_CLICK, onButton); create_fiber(blink); release_fiber(); return 0; }
Thanks @mmoskal. I'll check it out today.
Fixed in https://github.com/lancaster-university/microbit-dal/commit/f96a39036664495c7f934d1688c744f7d51b025b
Fixed in f96a390
Hi, I found a problem on the radio.Could you take a look at it for me? Fix: #462
From https://github.com/microsoft/pxt-microbit/issues/2709
The following program blinks nicely until A is pressed. Then the release_fiber() seems to exit.
Joe, this is blocking on MakeCode side.