Friday, 12 February 2016

Ozobot meets LEGO - Bringing Blocks to Life with a Mini Robot

My kids have been enjoying using their Ozobots with their LEGO bricks. They seem to think of the Ozobots as little creatures and want to make buildings and other interactive features for them.

We've made an OzoBot playmat with grid tape as the basis for their project and they have been using LEGO to create a world for the Ozobots to explore and interact with.

In this article we look at how my boys have used LEGO with Ozobot and there's a video showing Ozobot moving around LEGO town and interacting with LEGO buildings and objects.

Ozobot and LEGO

LEGO Mindstorms and LEGO Wedo are fantastic if you want to make robots using LEGO. Sphero and Dash have add-ons that allow you to build on to them using LEGO bricks. We love those options. But Ozobot offers something a bit different.

Ozobot is a mini-robot that's on the right scale to be part of a LEGO world. You can imagine LEGO characters interacting with Ozobot and Ozobot running errands and helping out in a LEGO town.

In my kids Ozobot LEGO town, Ozobot saves the town from a LEGO dinosaur, moves heavy logs at the forest and lets everyone know when the ship is ready for loading at the harbour. And after a hard day's work Ozobot entertains everyone with a light show at the crystal dome. Don't worry, Ozobot does get to have a short rest when it gets home.

Ozobot LEGO Town Overhead View

Basic Approach

Out of the box Ozobots follow lines and read colour codes. But my kids quickly wanted to move to custom behaviour so we've been using OzoBlockly which enables graphical drag and drop coding. OzoBlockly gives access to line following and colour-reading capability so there's lots you can do. It took a lot of prototyping and experimenting to work out the best intersection between the capabilities of OzoBlockly and what the kids wanted to do.

We came up with an approach that uses Ozobot's line following capabilities to follow black roads around the town and use the default random path-choosing ability to decide where to go at intersections.

Then there are short paths off the main road that lead to buildings and other action spots where Ozobot needs to perform a special action. This project is a work in progress, there's still room on the board for more action spots to be added and they can easily change the LEGO structures that Ozobot interacts with depending on their current interests.

Ozobot Houses

My kids have an Ozobot each and they have built them homes. They started off by building houses with LEGO floors but quickly realised that they wanted their Ozobots to go right into the houses rather than just up to the front door so they built them homes without a floor so that Ozobot can get right inside.

At each home a path leads off the main path and there are stickers to indicate that this is a home. The OzoBots can then be programmed to have special behaviour when they are at home. At the moment they have the same behaviour in each home but eventually the boys would like to have different code for their OzoBots and different stickers so that they can each find their own home and ignore the other one!

A blue sticker indicates a 'home'. The OzoBots are programmed to turn their light to blue and rest for a few seconds when they reach home.

Light Show!

The Ozobots have a coloured LED that you can set to any colour and put on a lightshow. There are also some preprogrammed lightshows in OzoBlockly.

We used transparent LEGO bricks to create a structure to disperse the light from an Ozobot. Ozobot drives right into the crystal dome and then reads stickers that tell it to put on a light show.

Trick Spot!

Dinosaur trick spot

My kids wanted OzoBot to be able to trigger tricks at certain points around the board by knocking something over or pushing something forward. There's a spot at the 'forest' for rolling a log and there's a domino run too. We've also got a LEGO chain reactions set which they want to work out how to trigger. 

When Ozobot reads the stickers to trigger a trick it moves quickly forwards and then backwards. The same Ozobot code can be used to trigger different actions and various places around the board. 

And More

There's a special action at the harbour where Ozobot stops for a while to supervise the loading or unloading of cargo. This has its own light sequence.

Ozobot's light turns yellow when it spots an intersection and has to decide which way to turn. 

The boys have more plans for the center of the board including making more use of Ozobots ability to roam freely rather than just following lines.

Ozobot LEGO Town in Action

Here's a video of one of our Ozobots exploring its LEGO town.


In a future article we'll take a look at the OzoBlockly code that makes all of this work. OzoBlockly allows you to use the line following features of Ozobot while adding custom behaviours. Ozobot walks randomly around the board following the lines and reading stickers when it gets to the end of the line. 


We've got one clear and one black Ozobot which make it easy for my kids to tell which one is theirs. They play with them together on the board and help out if there's going to be a collision. At the moment both Ozobots have the same code for using with the board, but I think they're going to want to change that so their Ozobots have their own personalities and behave a bit differently.

My kids love LEGO and play with it everyday. Ozobot has added another aspect to their play and they have been using their LEGO in a really purposeful way to solve problems. It's a great exercise in Design Thinking as they have been building with a user in mind, albeit a mini robot one! 

Read next: Ozobot Bit review

More from Tech Age Kids:


Post a Comment