OK, so I've learned lots about the mBot and mBlock programming since my last post.

The Good

It is possible, with patience, to write highly readable programs in mBlock (Scratch 2.0). The Makeblock team keeps improving mBlock.

The Not So Good

The over-the-air serial lag for WiFi precludes anything realtime. This includes controlling the motors and reading values from sensors. Cheap ultrasonic sensors are just not great. Jittery and just not reliable from my experience for highly precise measurements. There are more accurate ultrasonic sensors, but they are a bit pricey. You get what you pay for is the rule here. Programming in Scratch 2.0 can be pretty convoluted. The mBlock environment does not support Scratch lists. mBlock code generation is limited to double-precision floating point variables. Period. No strings. OK, enough of that. I knew it would be challenging, but perseverance is its own reward. After going down several rabbit holes (and taking a two week break from the problem to clear my head), I settled on making a wall following maze algorithm. It's not perfect by any means, but it can be implemented in mBlock.

mBot Solving a Maze

The Mighty mBot in Action!

I should mention that the maze itself uses 3D printed posts and pegs (see here a bunch of 4mm foam core board, and some black masking tape. I'll write more about the choices in another post, but enjoy the mighty mBot boldly going where no mBot has gone before.

[Originally published on Robotic Ramblings]