> 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/tutorials/detect-other-conditions.md).

# F. Detect Other Conditions

In this sixth tutorial, you'll learn how to make your robot detect other conditions (e.g., surface drop-offs, the robot's pitch and roll, when the robot is upside-down, when the robot is bumped, etc.) using its IR line sensors and accelerometer.

## Tutorial Goals <a href="#tutorial-goals" id="tutorial-goals"></a>

The goals of this tutorial are to help you:

* Program a robot app that uses the IR line sensors to detect a surface drop-off
* Program a robot app that uses the accelerometer to measure the robot's pitch and roll
* Program a robot app that uses the accelerometer to detect if the robot is upside down
* Program a robot app that uses the accelerometer to detect if the robot has been bumped


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/tutorials/detect-other-conditions.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.
