# 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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.idew.org/code-robotics/elegoo-experiments/template-experiments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
