Program doesn't show anything

Project

Problem:

Refusal to show anything. See below screenshot (it’s running in the screenshot).

This is my first time uploading to the forums, please lmk if there is something I should do better next time!

2 Likes

Hi @Picklebasho . Welcome to the forum!

I think the way the screen is simulated you may need to put pauses in the code for it to display correctly. The actual hardware may not require these extra pauses.

Here’s a version that seems to update the screen OK in the simulator: https://makecode.microbit.org/S87308-04877-30678-41181

I made a few changes to your code:

  • Added in a pause in the main loop.
  • Added in some while-loops to wait until buttons are released (otherwise the loops may be so fast that pressing right will cause it to update several times before you let go).
  • Clear the screen whenever the count is changed.

To get it to work in the simulator you need to hit the power button on the simulated screen (In the top left of the simulated screen). Then you can change modes by using the left/right buttons.

Thanks. This helps a lot.