Force Sensor Update? Is my code crippled?
I am quite new to RobotC and C++ in general. After some training lessons I came up with this program:
Note that "-" for motors means forward.
The Robot is supposed to go straight ( which it still doesn't although the motors b and c are synched. The motors do not turn with the same speed) until it hits a wall either with sonic or touch. It reverses and turns. If the sonic value is still too low it keeps turning. If touch is 1 wile turning it reverses again until its free. During this period a beeper is implemented so I can hear what the sensor value is. the problem is that the robot keeps turning until very long after no wall is in range anymore. The beeper showed me that the sensor value is still recognized as low. Is there a way to force a sensor update in that loop? Whats the problem in general. Seriously guys i have no experience so any help and comment is welcome.