Please Help with Code Explination
Hatem
Posts: 20
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 acceptable··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 help
·
·
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 help
·
Comments