I'm not usually one to ask for help, but after weeks of trying to get this to work, I'm reaching out for help as a ditch attempt.
I've been having trouble with programming my LEGO Sumo bot. Because of this, I started to learn the program more and more. I've still had this one problem though. How would I program my sumo bot to utilize opposite facing ultrasonic sensors? The closest I've gotten was having two normal 'spin seek destroy back up' loops running in parallel with another loop of the same idea only with opposite directions and the other sensor ports.
The problem with that is the robot seems to want to do each seek and destroy loop in a pattern. Front, back, front, back, and so on. This presents problems and negates the entire purpose of having both sensors. The other problem is when the back ultrasonic sensor is triggered first, the robot wants to spin in circles to seek and move the direction of the back ultrasonic at the same time. So it will jump backwards and turn back and forth in a stuttering motion.
My hopes is to have the robot spin and move toward an object that the ultrasonic sensor sees. Regardless of which ultrasonic sensor is triggered. After the target is seen the robot will move until the light sensor sees white, and move in the opposite direction.
I can provide more information if necessary.
I hope I'm okay in asking this here, it really is my last effort.
This is the full code:
This is the code inside each loop: