Shop OBEX P1 Docs P2 Docs Learn Events
boe bot coding — Parallax Forums

boe bot coding

jmarss406jmarss406 Posts: 3
edited 2007-06-22 03:21 in Robotics
·I am new to this and terrible at coding, How do you get the boe bot to follow a flashlight avoid walls, and basically do all the codes they give you in the manual at the same time. I can only get one at a time to work
·you can email me back @ marcellaj@wit.edu

thanks

Comments

  • Matt WhiteMatt White Posts: 60
    edited 2007-06-22 02:15
    It helped me to read through the manual and go through each example step by step to understand how they worked. There's alot of great information in the educational section of the Parallax site.

    I'd start here: http://www.parallax.com/dl/docs/books/edu/Wamv2_2.pdf
    But there are many others that discuss more advanced topcis... for "making it all work" take a look at: http://www.parallax.com/dl/docs/books/edu/Roboticsv2_2.pdf

    Hope that helps!
    Matt
  • Mike GreenMike Green Posts: 23,101
    edited 2007-06-22 03:21
    Basically, you've got about 20ms between servo pulses to read sensors, make computations, and figure out what to do next. Some of these decisions only need to be made occasionally (once or twice a second). The general notion is that, where possible, you make each of these decision making routines (or parts of them) into subroutines that execute in about 10-15ms. Each one occupies a "time slot". In the main loop that includes the servo pulse outputting code, you have an ON ... GOSUB ... where the index is incremented each time through the loop and is reset by using the "//" (modulus) operator after the increment so it "wraps around". The different subroutine labels fill out the statement. If you need to execute one routine more often, you can include it in the list of labels more than once.
Sign In or Register to comment.