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

![](https://content.gitbook.com/content/MfAgVPmRsKEnmhEIw5BF/blobs/zUmP2D7xyvp6PZT98wCl/image.png)

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

![](https://content.gitbook.com/content/MfAgVPmRsKEnmhEIw5BF/blobs/UcHpC3ZQAS5lmBlP3Bpq/image.png)

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

![](https://content.gitbook.com/content/MfAgVPmRsKEnmhEIw5BF/blobs/NCzemnWlm2p40nCXN4Yw/image.png)

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

![](https://content.gitbook.com/content/MfAgVPmRsKEnmhEIw5BF/blobs/zYfNudNfi0ny71bHqeCT/image.png)
