We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
3D maze in browser controlled by Small Basic
#52
You are right, we will not be able to achieve exact rotation at all, the best will be to within maybe around 10 degrees, similar for forwards movement.  So the little step-by-step approach is that we rotate or move in the smallest possible step in the direction we want to head, and incrementally update this and go slowly where we want.  This is what I did in the code I shared.  Note that after each small step I update where we actually are (or how much rotated) and work out how to turn or move from where I am, so the errors are not compounde, I just keeep updating, which is why I put a good sized delay after each small step to ensure all movement is finished before I reassess how to move next.

However, you have found that the tollerance is roughly constant and therefore we can move or rotate a larger a amount in a single step (with similar accuracy) rather than using lots of small steps as I did.  This would make the robot faster than I had it.
Reply


Messages In This Thread
RE: 3D maze in browser controlled by Small Basic - by litdev - 02-06-2025, 11:50 AM

Forum Jump:


Users browsing this thread: 15 Guest(s)