0

This is the first time I post here on Stack overflow. Bare with me if I am not clear at any point. I will work with with you and edit my questions to the best of my abilities.

I'm having difficulties getting this DFrobot maqueen to function. I've manage to make it work on a line track, but implementing object avoidance is another story.

I am currently working on https://makecode.microbit.org/#editor

This is the block of code I have so far. The first three if else if statements are supposed to guide the robot to follow the shortest path. While the last if statement tells the robot to back up. I am having trouble programming it to do anything else but backup.

While this is my course. It must be able to follow go through the intersection to find the shortest path possible. I have the bot so that it goes through the intersection. It see's the object then it backups. But I don't know how to program it do anything else after that.

Jonas
  • 121,568
  • 97
  • 310
  • 388
Tempo
  • 1
  • 2
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Chiperific Nov 16 '22 at 14:28
  • Hello thank you for replying. I've just edited the question and included two pictures. One to my code block, and the other to the track itself if that helps. – Tempo Nov 16 '22 at 15:53
  • Lemme know if I cam make the question any clearer. – Tempo Nov 16 '22 at 15:53
  • Hi Tempo. Thanks for updating the question. Unfortunately, you've added links to pictures, which is doubly discouraged. You need to post actual code (not pictures) and it needs to be in your question (not links). Please see [this link](https://stackoverflow.com/help/minimal-reproducible-example) for tips on writing a good question that will attract answers. – Chiperific Nov 16 '22 at 16:15
  • Thanks for the link, I'll make sure to put it in good use. I'll accommodate my question to the blocks that I am using. – Tempo Nov 16 '22 at 16:19

0 Answers0