I have a hexapod that is properly working. I used the program h2prog01.bas.
The thing is that I don’t understand everything that is written in the program. And I want to write my own programs for my future projects
I’ve searched in the manual but some terms are not explained.
Does someone wants to explain me about the code?
**DeadZone **is the tolerance of the PS2.
PS2 joysticks have a large deadzone in the center of the joystick, an area where no data is sent. Deadzone is how far you move the stick to left or right before it starts moving. Say theres a deadzone of 5mm, you have to move the stick left or right 5mm before it starts responding.
DeadZone con 28 ; must be >= 28 is saying the deadzone cannot be larger than 28.
panpin: is the connection of the pin number PanNeutral: is the center, point of the rotation… “0 - zero” PanRange: is how far it will move (min/max range)
Close… The dead band must be larger than 28. The deadband is a threshold amount. The program needs to know if the bot is being told to walk or not. The sticks will report slightly different values (noise) even if the sticks are not moving. This deadband makes sure the sticks are really being moved so the program can act on the change, and ignore noise. Too much dead band and you lose resolution, too little and you risk having the program react when it shouldn’t.