MicroBlocks on microcontroller as input to computer display?

I got a chance to look at MicroBlocks a little more today. I was under the (perhaps incorrect) impression that it was something of a combination of the Arudino & Processing software -- able to program a microcontroller as a stand alone device, but also as a way of drawing on the screen as Snap! does. I see there's the built-in data graph, but I don't see a way to do anything with the data, so there's no way to output the data in alternative format (for example as a diagram that changes colors based on a sensor).

Am I missing something?



MicroBlocks output capabilities are not such that fancy visualizations can be achieved. It is meant more for doing elementary data output in graph format, and display any calculated results within the mB environment via SAY blocks; mainly for debugging purposes.
This is because its primary purpose is to drive microprocessor driven gadgetry in a tetherless fashion, and not necessarily to do heavy calculations and analysis of data - we have SNAP! for that.
There are a variety of libraries in microBlocks that enable one to use display devices attached to the microcontrolled devices. Those libraries allow one to extend the display capabilities onto those external devices, e.g.: LCD/LED panels.

However, one can make use of the various Mozilla web server
functionalities; and, depending on the boards used, web, wifi, hotspot and networking capabilities of microBlocks to establish connectivity to outside environments and devices etc and pass data back and forth and process it in any way needed.

Oh! I hadn't considered an external LCD panel -- even though they're all over the microblocks.fun home page! That could be great.

I'm trying to use it as an display for sensor data. The Citilab ED1 looks promising -- are they sold anywhere? I didn't find it online available anywhere. (I'd also love to get one of the Fantàstic! robots to use with my kid if they're available.)

I tracked down the M5GO, which is a variation of the one on the MicroBlocks page. It seems to be able to hook up to sensors, and also looks pretty promising:

One suggestion for the home page would be to identify those boards with labels and links. I knew about micro:bit, and was thinking about it first because of the low cost. But these other boards are better suited to sensing and display.

I should add that having MicroBlocks support multiple boards makes the cost of future switches lower, so the boards become more of a commodity. So on that front, great work making this all work! Bravo!


Hi Joel,
I don't know if you have alredy seen the link in on the microBlocks web page on devices supported.
It is quite a variety and they work great.
In addition to micro:bit, I personally used it with the ESP8266 boards (both LOLIN and WEMOS mini), ESP32, Arduino M1 with great success.
On the robotic testing side, I purchased a KeysStudio micro:bit car and a motor drive breakout card. The car comes with various LEDs, IR, Sonar, battery connections, and has very nice motors.
The other breakout board is my favorite for interfacing to anything out there. It has full 3V and 5V pin breakouts, BL interface and enough power to drive DC motors, steppers, and servos. I have used this board to link up to both Arduino family and ESP family of MCs with BL , UART serial, SPI, and I2C.
By the way, I am NOT affiliated with microBlocks at all. I am just a enthusiastic user who helps out with debugging and translations etc.
All the development KUDOs need to go to the main developers John Maloney, Bernat, Joan, and Jens.
And YES, microBlocks is a much greater alternative to MakeCode and other dev environments. And I must add that it's ability to sustain performance all the way down to 20microSec level allows one to write and experiment with many low level driver code for MCs.


Hi tguneysu,
You said that you were able to run microblocks on Wemos mini. I also do some testing, like making the led blink, it works fine, but i plan to make a more sophisticated application for home automation with a raspberry pi and node red. I would like to build PIR sensor on the wemos D1 and send notification via wifi to the raspberry. I think it could be done quite easily with microblocks. But now, iam not able to store the code on the wemos. I read some tutorial taht tells that the code is automatically stored in the wemos, but it is not the case. and the execution of the code with the run/stop button is not working in my case. Did you experiment also thoses behaviours ? regards

Can you post an image of your code that isn't being stored.

I'll try and dig out a WEMOS and try it out to see if I get the same issue

I am running mB version 1.0.5 with FW: 103.

Just tested my Wemos with my WTSLogger tutorial @ https://wiki.microblocks.fun/community_projects .

Everything worked OK. No problems.

There's been a lot of FW and release changes with microBlocks. Make sure your boards are up to date.

Some pointers (if you are aware of these, I apologize):
If you are using the browser version, open the control panel with shift-ctrl-i, or if you are on the desktop version look at the console display window (the other command.com window that opens up when you run it)

You don't have to STORE your app code on the devices under microBlocks. It happens automatically.

However, there are some cases where the board udate is very slow. So to make sure your device is updated with your code, click the STOP button in the IDE followed by Run and observe the display panel messages. They should be:

All tasks stopped
Memory cleared

There has also been a lot behavior changes with the USB connection of the devices. Mainly to automate the process for the better. However, these auto attempts sometimes cause retry loops that seem to go on forever. Again watching the display panels mentioned above will be helpful to detect these if any.

Firmware updates are now handled automatically in the IDE with the help of auto-detection. However, sometimes it does not work depending on the board's internal condition. So it is best to force it via SETUP menu option "update firmware on board" and observe via display panels.

I hope these will help you get going.

Good Luck.