Would you like to have a simulator in MicroBlocks IDE?

Issue #249 closed
Wenjie Wu created an issue

Such as micro:bit simulator.

Many people think MakeCode's simulator attractive in the classroom.

MicroPython also have a simulator:

https://github.com/microbit-foundation/micropython-simulator

Is it possible that MicroBlocks will have simulators in the future?

Comments (4)

  1. John Maloney repo owner

    Thanks for asking. The short answer is “no”.

    Although the MakeCode simulator is attractive and it can be useful for remote learning, I think using a simulator misses the key point of physical computing, which is to connect to the physical world. Coding against a simulator is not much different than programming in Scratch, except what you can do is much more limited.

    Physical computing can be extremely engaging for students – including some students who might not be interested in Scratch – but only if it actually connects to the physical world. Using a simulator, even as just an introduction, could make many students lose interest. Much more fun to dive into using real hardware.

    Even a good simulator is a poor approximation to the physical world. A simulator can’t tell you the temperature in your garden, when the sun rises, or how it feels to control a game by tilting a micro:bit.

    A simulator is a lot of work to maintain over time, even for a single board, and MicroBlocks supports many boards. Furthermore, a simulator is never finished, because there are an endless number of hardware peripherals that users might want to simulate. So, even if someone gave us a finished simulator, I would not want to take on the burden of maintaining and extending it going forward.

    That said, if you are really excited about making a simulator, you could create one , either as a third-party add-on to MicroBlocks (i.e. not supported by the MicroBlocks team), or simply as a fun experiment.

    But there might be related projects that are even more fun and interesting..

    You might look at GnuBlocks , an implementation of the MicroBlocks virtual machine created by Bernat that runs on Linux and can be programmed with the regular MicroBlocks IDE. (See the linux+pi folder in the repository.) GnuBlocks is pretty cool all by itself – like having a really, really fast microcontroller with tons or RAM, a big display, and high quality sound output. 🙂

    A related project would be to develop a way to program a remote server using the MicroBlocks IDE. That system would use a TCP socket or websocket instead of serial port to connect to the server to be programmed. The server might be running on your local computer, on an ESP32 or Raspberry Pi on your local network, or on a hosting service in the cloud.

  2. Wenjie Wu reporter

    Hi John, you have such clear and deep thinking about everyting you do or don't do, you are truly a philosopher in the computer world !

    By the way, I I used to refuse use the MakeCode emulator as long as there is a micro:bit board.

    I totally agree with your eloquence here, so much so that I stopped thinking about anything related to MicroBlocks simulator.

    My passion for physical computing comes entirely from what you said:

    A simulator can’t tell you the temperature in your garden, when the sun rises, or how it feels to control a game by tilting a micro:bit.

    The physical world is truly amazing playground !

    This is a great answer that should probably be included in the MicroBlocks FAQ.

  3. Log in to comment