I have been working on trying to get my servo powered robot, Hack-e-Bot, working with the MicroBit so that younger kids can program it’s basic movement to navigate through an obstacle course. I now have custom blocks that can be used to control any servo powered robot using Pin 0 and Pin 1.
I plan to do a more detailed tutorial on how this was done later, but for now here is how it works.
The Offset block lets you dial in the servos if the robot starts veering to one side or the other while driving forward or backwards. Use positive or negative numbers to increase or decrease the power distribution for the wheels.
Forward, Backward, Right, and Left blocks can be used to move the robot, but they require some info. Each one needs to know the speed to move the servo and the delay until the next command.
The Stop block is needed to tell the robot to stop moving. Without it, the robot will just keep doing the last movement command sent. This block has an option for a delay after it sends the command to stop before continuing with the program.
That is it.