Jump to content

Recommended Posts

Posted (edited)

How do I program my Lego Mindstorms v3 robot to go straight until it detects an object and then return to where it was? What I don't know how to do is to go back to where it was without knowing how far it is going to go because the object it has to detect can change its place. 

Edited by aaaaaa_aa
Posted

you can use the motors as a sensor (rotations in degrees)

- get the value when you start

- get the value when object detected

- move back with the difference of the two

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...