# Python, Blockly, AND MicroBlocks

**URL:** https://xrp.discourse.group/t/python-blockly-and-microblocks/168
**Category:** Programming tools
**Created:** [December 1, 2023, 5:00pm UTC](https://xrp.discourse.group/t/python-blockly-and-microblocks/168 "2023-12-01T17:00:23Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![SCSpaeth](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/scspaeth/32/90_2.png) [@SCSpaeth](https://xrp.discourse.group/u/SCSpaeth)
#### Post date: [December 1, 2023, 5:00pm UTC](https://xrp.discourse.group/t/python-blockly-and-microblocks/168/1 "2023-12-01T17:00:23Z")

</div>

In an earlier topic in the Blockly category, @kgiori asked, “[Why not embrace MicroBlocks instead of Blockly?](https://xrp.discourse.group/t/why-not-embrace-microblocks-instead-of-blockly/32)” I assume that XRP developers have considered many options and settled on Blockly for valid reasons.

Members of the [MicroBlocks](https://microblocks.fun/) community also have valid reasons for wanting to use MicroBlocks for programming the XRP. KGiori cites the live feature of its IDE and ease for learners to get started. It is also well integrated with other blocks programming environments like [Snap!](https://https:snap.berkeley.edu) for more advanced users. It is also available in sixteen languages for use around the world.

For these reasons and more, we have started to develop an XRP library for the MicroBlocks IDE. The existence of virtual machines for RPi Pico and libraries for servos, distance sensors, and [PicoBricks](https://picobricks.com/) have facilitated development. We have had some challenges in getting data from the IMU (accelerometer and gyroscope) because of differences in pin assignments for i2c. But we are making progress and look forward to sharing support for programming the XRP with MicroBlocks, too!

---

<div class="post-metadata">

### Author: ![Peter](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/peter/32/83_2.png) [@Peter](https://xrp.discourse.group/u/Peter)
#### Post date: [December 2, 2023, 1:38pm UTC](https://xrp.discourse.group/t/python-blockly-and-microblocks/168/2 "2023-12-02T13:38:37Z")

</div>

What was not yet mentioned in the “discussion” is that someone did some tests and compared micropython and MicroBlocks. In the test MicroBlocks was 3 times as fast as micropython.  
 ![image](https://canada1.discourse-cdn.com/flex011/uploads/xrp/original/1X/ca072d5e9678a394e2f1a01554207ea02aba5a7f.jpeg)

---

<div class="post-metadata">

### Author: ![SCSpaeth](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/scspaeth/32/90_2.png) [@SCSpaeth](https://xrp.discourse.group/u/SCSpaeth)
#### Post date: [December 2, 2023, 2:04pm UTC](https://xrp.discourse.group/t/python-blockly-and-microblocks/168/3 "2023-12-02T14:04:23Z")

</div>

@Peter, Thank you for this reference. While I learned in a previous post that MicroBlocks Discord links do not display in Discourse unless you are an authorized user of the MicroBlocks server, this result is important enough to merit providing a link for those who are interested:

> **[Discord - A New Way to Chat with Friends & Communities](https://discord.com/channels/1000653853491998760/1083593745531936778/1166340710618902568)**
>
> Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.

This Discord link takes authorized users to the original source of the image Peter displayed in his post. If you are interested in learning more, you can find an invitation to the MicroBlocks Discord forum in the lower right corner of the MicroBlocks.fun home page.

---

<div class="post-metadata">

### Author: ![Peter](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/peter/32/83_2.png) [@Peter](https://xrp.discourse.group/u/Peter)
#### Post date: [December 2, 2023, 2:29pm UTC](https://xrp.discourse.group/t/python-blockly-and-microblocks/168/4 "2023-12-02T14:29:36Z")

</div>

@SCSpaeth, thank you for sharing the link. Great that you are pointing out were users can find the link to the MicroBlocks Discord server. I don’t know if it is allowed to post the link in a topic.

---

<div class="post-metadata">

### Author: ![SCSpaeth](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/scspaeth/32/90_2.png) [@SCSpaeth](https://xrp.discourse.group/u/SCSpaeth)
#### Post date: [December 2, 2023, 2:38pm UTC](https://xrp.discourse.group/t/python-blockly-and-microblocks/168/5 "2023-12-02T14:38:11Z")

</div>

@Peter, Let’s find out:

> **[Join the MicroBlocks Discord Server!](https://discord.com/invite/TCpHYbcvkS)**
>
> MicroBlocks is a blocks programming language for physical computing inspired by Scratch. | 78 members

Someone will tell us if they think it inappropriate.

---

<div class="post-metadata">

### Author: ![SCSpaeth](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/scspaeth/32/90_2.png) [@SCSpaeth](https://xrp.discourse.group/u/SCSpaeth)
#### Post date: [December 2, 2023, 3:59pm UTC](https://xrp.discourse.group/t/python-blockly-and-microblocks/168/6 "2023-12-02T15:59:05Z")

</div>

wenjie is the developer that @Peter references in his post showing the speed comparison between MicroBlocks and Micropython. You can learn more about his work at [https://wwj718.github.io/](https://wwj718.github.io/) where he documents work on many micro-controller projects. The posts are written in simplified Chinese that might discourage some users. But, use a Google Chrome browser to visit that site and it will offer to translate the posts into English.

 ![wenjieTranslation2023-12-02](https://canada1.discourse-cdn.com/flex011/uploads/xrp/original/1X/53f585d34647bfacb6fb87c59fa35d96e85a34fa.png)

If you are committed to Micropython on the XRP, you still might want to take advantage of some of the affordances of MicroBlocks. Wenjie describes a way communicate between Micropython and MicroBlocks in both directions:

[Microblocks interoperability with Micropython](https://wwj718.github.io/post/%E7%BC%96%E7%A8%8B/microblocks-interoperability/#microblocks-%E4%B8%8E-python-%E7%9A%84%E4%BA%92%E6%93%8D%E4%BD%9C)
