One comment about your robot though. it seams to keep going left and right and does not have a go straight command. did u remove that part of the code? did u set the threshold too low?
Thanks for the comments, Mansoor. Sorry to hear about killing your MC.
The code is untouched, I wouldn't know where to start in changing it, to be honest.
As my PC has been destroyed, and I have only just got it back up and running (with loads of stuff missing

), I haven't had time to 'play'. I'm going to try and see if I can understand the coding, and maybe play with the settings. You're right, it doesn't seem to want to go straight, but that was with the very bright sunlight on my bench. In the kitchen, on the floor, it just keeps going straight until it bashes into something LOL.