I am programming a robot, and I was wondering if there was code to cause the robot to stop whatever it was doing if a bumper was activated. Right now I am using a while loop but the combination of the slow processor, fast motors and complex functions executed while moving cause a delay that has damaged the robot when the bumpers were activated. Is there a way to get it to break out of whatever the program is doing, even in the middle of a function and jump to the bumper activation code?
wonderboyshp 0 Newbie Poster
Dani 4,329 The Queen of DaniWeb Administrator Featured Poster Premium Member
Chainsaw 12 Posting Pro in Training
wonderboyshp 0 Newbie Poster
wonderboyshp 0 Newbie Poster
Chainsaw 12 Posting Pro in Training
wonderboyshp 0 Newbie Poster
DGmick 0 Newbie Poster
wonderboyshp 0 Newbie Poster
Chainsaw 12 Posting Pro in Training
wonderboyshp 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.