Here’s a picture of the maze I’m using to develop a maze solving program for the mBot for the class I’m teaching in February. The black lines are for ensuring that turns are fairly accurate using the line following sensor. The ultrasonic sensor will be used to determine distances to walls. The program will be creating a map of the maze as it goes, and when it solves the maze, it will turn around and go back to the start (hopefully) without any errors.
Unfortunately, this has to be built in the Arduino IDE because the extensions in mBlock don’t fully support all Scratch blocks (lists are the primary missing item for this exercise) and the over-the-air lag times associated with serial communications make accurate movements/turns overly difficult when running the program from the mBlock IDE.
In any case, it’s being a great exercise that tests what clever programming can do in a tightly constrained memory environment. Fun for all?