# Code Introduction

This Robotics Code Guidebook is a supplement to the [Robotics Project Guidebook](https://docs.idew.org/project-robotics/).

## What's in this Guidebook?

This guidebook contains a series of **robotics code tutorials** to help you get familiar with programming your robot to perform different behaviors and tasks.

In addition, this guidebook contains **coding references** to explain how to add code in your robot app to control its physical inputs and outputs. There are also coding references for different robot behaviors and navigation modes.

Finally, this guidebook also contains **links to external resources**, such as an online Arduino code editor (web IDE) for creating your robot apps, programming language references, and additional experiments for learning how to use the robot.

{% hint style="success" %}
**HOW TO COPY CODE:** When using these coding tutorials and references, you can copy a code block by clicking the **copy icon** displayed in the upper-right corner of the code block.
{% endhint %}

```cpp
// example code block

void setup() {
​
}
​
void loop() {
​
}
```

## Your Robotics Kit

This guidebook is tailored for a two-wheeled robotics kit called the [SparkFun Inventor's Kit for RedBot](https://www.sparkfun.com/products/12649), which will simply be referred to as the RedBot.

SparkFun sells other sensors and actuators that may be compatible the RedBot. If possible, it is highly recommended to add an [ultrasonic sensor](/code-robotics/references/physical-inputs/ultrasonic-sensor.md) to the RedBot for more design possibilities. This sensor is inexpensive and can be easily connected to one of the unused set of pins on the RedBot circuit board.

{% hint style="warning" %}
**NOTE:** Your instructor may have provided you with a different robotics kit. If your robotics kit uses **Arduino**, then you might still be able to use this guidebook to learn how to program your robot to perform different behaviors and tasks.
{% endhint %}

## Copyright and License

Copyright © 2015-2025 by Jim Lyst and Michael Frontz, Indiana University Luddy School of Informatics, Computing, and Engineering at Indianapolis.

This work is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/). You are free to use, share, or adapt this material for noncommercial purposes as long as you provide proper attribution and distribute any copies or adaptations under this same license.

[![Creative Commons License](https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png)](http://creativecommons.org/licenses/by-nc-sa/4.0/)


---

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