Main robot code