having issues with subroutine commands. . . . .
thefitz85
Posts: 16
i have attached a copy of my code for reference. the program is for simple obstacle avoidance. the serout 16 commands are the instructions for my motor controller amplifier. i am using a household universal remote with a seperate device to initiate the bots movement, and to stop the bot. the problem that i am having is when i initialize the bot movement the program jumps to the proper subroutine (obstacle_avoidance), however from that point it is not running through the if then statements in the obstacle_avoidance subroutine. i am unsure why it wont begin the if then statements, which as you can see from the code would then initialize other subroutines (back_up, turn_left, turn_right, and forward_pulse). am i missing some return command or do-loop statement? any help would be greatly appreciated. thanks matthew fitzgerald
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen