Use buttons to control the motors
After the project file is downloaded locally, it can be imported into MakeCode for viewing and re-editing, or it can be burned directly to micro:bit via USB to run.
- Stop when starting or resetting.
- Press the button A and B at the same time to go straight.
- Press button A to turn right.
- Press the button B to turn left.
InHardware analysis and calibration: Drive circuit,There is a switch in the drive circuit, which can switch the drive circuit from LM393 voltage comparator control to micro:bit control. The micro:bit control method of the drive circuit is the same as the LM393 voltage comparator, starting at low level and stopping at high level.