Shop OBEX P1 Docs P2 Docs Learn Events
Please Help with Code Explination — Parallax Forums

Please Help with Code Explination

HatemHatem Posts: 20
edited 2008-02-17 05:15 in BASIC Stamp
Hello .. I was hoping if some one could explain to me in details this attached code. I got this code from parallax website and added some commands to have it send messages via Bluetooth. The Bluetooth commands were also obtained from parallax website. I·am not sure what code or line·does what and·how can·I optimize its performance. I tried adjusting several values for the Ping)) but the performance is still not acceptableshakehead.gif··For example, the following code indicates Turn_Left subroutine:
·
Turn_Left:··································· ' 45 Degrees Left Turn
· FOR pulseCount = 0 TO 7·············· ' Number Of Pulses To Turn
··· PULSOUT PingServo, 690············· ' Ping Servo Forward Pulse Value
··· PULSOUT LeftServo, 650············· ' Left Servo Left Pulse Value
··· PULSOUT RightServo, 650············ ' Right Servo Left Pulse Value
··· PAUSE 20
· NEXT
· RETURN

·
What line controls the 45 Degrees Left Turn. What are the pulse count for and how it is related to the roaming??
·
I really don't care if you write or alter my code. Please write as many comments as possible in the code. Do whatever you like to it in order for a beginner like me to understand the concept.
·
Please helpcry.gifcry.gif
·

Comments

  • SteveWoodroughSteveWoodrough Posts: 190
    edited 2008-02-17 05:15
    Download and read the PDF version of the Robotics with BoeBot Manual. It's pretty simple, and they do a good job of explaining it there...
Sign In or Register to comment.