> For the complete documentation index, see [llms.txt](https://docs.idew.org/code-robotics/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.idew.org/code-robotics/elegoo-experiments/template-experiments.md).

# Template Experiments

## Drive a Pattern with Your Robot

Uncomment the `drivePattern()` function call in the loop, as show below. Remember, `//` identifies comments that are not run by the program. So when we remove the `//` that line will now run. Upload the edited program to see what happens after you flip the toggle switch on the robot.

![](/files/AICLhdkkEuHwM3TPiJzq)

## Use the Ultrasonic Sensor to Drive Up to a Wall and Stop

Uncomment the `driveUpToWall()` function call in the loop, as show below. Comment out the `drivePattern()` function like  `//drivePattern();` Since we don't want to run both functions. Upload the edited program to see what happens after you flip the toggle switch on the robot.

![](/files/T6PRHfgBH3MlqOVQVpza)

## Try to Follow a Line with the Robot

This one requires a line on the floor to follow and may take some adjustments to the function to get it working based on the lighting and brightness of the floor and line.

![](/files/PFu3A5Utf8iS4trzUEzx)

## Use the Phone App Input to Trigger Events on the Robot

![](/files/WQlb0ONzG6lBA6gV8fJi)
