I just build my zumo robot with arduino shield. It work great on maze solver and line follow arduino code. But the sumo Collision detection seems not working. The robot only constantly move forward and backward, and random turn left and right. It won’t move straight to the border line like the one I saw on the video.
Do I missing something ? or the I need to adjust the arduino code ?
Thank you for your help
Which Arduino model are you using? To use the IMU features of the shield, there are jumpers on the shield that might need to be changed for different Arduino models. You can read more about these jumpers in the “Jumper settings” section of the “Zumo Shield for Arduino User’s Guide” which is linked to on the “Resources” tab of the Zumo’s product page.
I use arduino uno. I did not soldering any jumper on the zumo shield since they are connected by default Do I need to solder any of this jumper on scl and sda ?
Thank you very much.
Arduino Uno R3 is the model.
After reading the user guide… still can not find anything wrong on my setup. currently I did not have any jumper on the SDA and SCI which is base on the user manu. They are connect by default.
Is anything I can try?
thank you very much
sorry after double check with uno… I think is arduino u2 version. How can i connect A4 and A5 manually to arduino port?
after replace the R3 version… still have the same issue. Any suggestion i can try?
Can you post pictures here that show your robot and any soldered connections you have made? Also, do any of the other IMU examples (like the Compass) example work? The BorderDetect sketch is a more basic sumo code. Does that one work?
After hours of debugging, I found a solution. I made a few modifications to the border detection code, and it worked. There is no issue with the hardware.
I modified the sample border detection code from the Pololu download link . Line 72," if (sensor_values < QTR_THRESHOLD)", Ichange to " if (sensor_values > QTR_THRESHOLD)". I should be greater the QTR_threshold.
Line 81,“else if (sensor_values < QTR_THRESHOLD)” I changed to “else if (sensor_values > QTR_THRESHOLD)”. It works perfectly now.
It should be greater than the QTR_threshold on both if statements.
Not sure the code is wrong or my IR sensor reading is reversed.
It all works out now. I love this robot.
Thank you for helping me.
I am glad you were able to get it working. The demo code is written for black colored sumo rings with a white border like the video below. When you placed it on the white surface, the robot thought it was seeing the edge of the ring and kept backing away each time it looked at those sensors. Inverting the logic statement should cause it to stay in a white area and reverse when it encounters any black lines.
yes. that is what happen to my robot… It read the white board with black line. it totally make sense now.
Thank you very much.
10x mlk8!! Great solution, I had the same problem with a non-“standard” surface. Cheers!