# Arduino Backpack

The Misty Backpack for Arduino is a microcontroller embedded in a magnetic mount that communicates with your skills via the UART serial port on Misty's back

### Programming the Misty Backpack for Arduino

The Misty Backpack for Arduino uses an [ATmega328P microcontroller](http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf) pre-programmed with a bootloader that allows you to upload code directly from the [Arduino IDE](https://www.arduino.cc/en/Main/Software). When you upload your code, you must target the Arduino Pro or Pro Mini board and the ATmega328P (3.3v, 8MHz) processor.

Follow these steps to configure the Arduino IDE to upload code to Misty's Arduino-compatible backpack:

1. Download and install the [Arduino IDE](https://www.arduino.cc/en/Main/Software).
2. Connect the Misty backpack to your computer via the backpack's USB micro port.
3. Open the IDE and select **Tools** from the top menu.

   1. From the **Board** sub-menu, select **Arduino Pro or Pro Mini**.
   2. From the **Processor** sub-menu, select **ATmega328P (3.3V, 8MHz)**.
   3. From the **Port** sub-menu, select the port that the microcontroller is connected to. (Your port number may be different than what is pictured here).

   <figure><img src="/files/WzZ7ezKbbbyTgPKyy5LG" alt="" width="448"><figcaption></figcaption></figure>

#### Notes:

When using hardware serial to communicate with Misty (pins D0 and D1), you must remove the board from Misty before you can upload a new sketch. If you are using the software serial pins (D8 and D9), you can upload a new sketch without disconnecting the board.

The Misty Backpack for Arduino supports hardware serial communication over pins D0 and D1. These pins are wired by default to interface with the serial port on Misty's back, that is the way we’ll use to allow communication between Misty and Arduino.

If you want more information about the Misty Backpack for Arduino check [this link](https://docs.mistyrobotics.com/misty-ii/robot/misty-backpack-for-arduino/).


---

# 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://lessons.mistyrobotics.com/arduino/arduino-backpack.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.
