# Drv2605 Example
This example shows the use of the `drv2605` component to communicate with and
control a DRV2605 I2C haptic motor driver for linear resonant actuator (LRA) and
eccentric rotating mass (ERM) haptic motors.

<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
**Table of Contents**
- [Drv2605 Example](#drv2605-example)
- [How to use example](#how-to-use-example)
- [Hardware Required](#hardware-required)
- [Build and Flash](#build-and-flash)
- [Output](#output)
<!-- markdown-toc end -->
## How to use example
### Hardware Required
This example can be used with the [Adafruit DRV2605
Breakout](https://www.adafruit.com/product/2305) over I2C.
The sample has code for both ERM and LRA, but make sure to update the call to
`drv2605.select_library(...)` depending on which type of motor you have (ERM is
1-5, LRA is 6).
This sample also shows how to configure and run motor calibration.
### Build and Flash
Build the project and flash it to the board, then run monitor tool to view serial output:
```
idf.py -p PORT flash monitor
```
(Replace PORT with the name of the serial port to use.)
(To exit the serial monitor, type ``Ctrl-]``.)
See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.
### Output

To create a project from this example, run:
idf.py create-project-from-example "espp/drv2605=1.0.26:example"