I already succeeded, this is the makecode code to drive the microbit maqueen v3 with matrix distance sensor v1.0 and avoid obstacles. This is the code: