I used to equip an EV3 with three ultrasonic sensors for the purpose of navigating through a landscape with obstacles. Using nested if statements I had the EV3 stop when it came across an obstacle after which it tested left and right for obstacles with the other two ultrasonic sensors, before turning in one of the directions. This worked fine in the Lego Mindstorms programming environment but I haven’t managed to achieve the same in the MakeCode environment.
So far I haven’t found a way of making nested if statements based on ultrasonic sensor information. Perhaps any of you can see a way of achieving the desired functionality with or without if statements.
I would be really grateful for some help with this.