robotic pattern app code