Code for robot