The MicroBlocks Library

The MicroBlocks library has significantly simplified our work with microcontrollers. It enables us to control external motors, sensors, and actuators within Snap!, making projects like our computer-controlled microscope feasible. We also are fans of the Brown Dog Gadgets family of components that are designed to snap onto LEGO bricks. This video demonstrates use of these components with Snap!

Students can quickly prototype a concept using LEGOs, Brown Dog Gadget components, and Snap!. Once a proof of concept is developed, a more permanent version can be created using 3D printers, etc.

For those who may be interested, here is the MicroBlocks code used on the micro:bit in this example. This code serves as a bridge enabling Snap! to communicate with the microcontroller.

Connect to Snap.ubp (8.5 KB)

Here is the corresponding Snap! code that communicates with the micro:bit via the MicroBlocks code on the micro:bit.

Snapping on physical blocks to be controlled by snapped on digital blocks!

Exactly!