# Adafruit ESP32 Feather V2

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/117/183/medium800/adafruit_products_FV2_top.jpg?1671562977)

One of the original Adafruit star Feathers is the&nbsp;[Adafruit HUZZAH32 ESP32 Feather](https://www.adafruit.com/product/3405) - with the fabulous ESP32 WROOM module, it makes quick work of WiFi and Bluetooth projects that take advantage of the Espressif popular chipset.

Recently we had to redesign this feather to move from the obsolete CP2104 to the a new USB-to-serial converter chip. One thing led to another and before you know it we made a completely refreshed design: the **Adafruit ESP32 Feather V2**.

The V2 is a significant redesign, enough so we consider it a completely new product. It _still_ features the ESP32 chip but has many upgrades and improvements:

- Compared to the original Feather with 4 MB Flash and no PSRAM, the V2 has **8 MB Flash and 2 MB PSRAM**
- Additional **user button tactile switch** on input pin 38
- Additional **NeoPixel mini RGB LED** with controllable power pin
- Additional **STEMMA QT** port for plug and play I2C connections
- **USB Type C** port instead of Micro B
- **Separate controllable 3.3V power supply for STEMMA QT** to allow for ultra low power consumption even with sensors are attached
- Designed for low power usage: [verified with a PPK](https://www.adafruit.com/product/5048) to **draw 70uA from the Lipoly battery in deep sleep** and 1.2mA in light sleep.
- ESP32 Pico module is much smaller, allowing for clear marking of all breakout pads and additional mounting holes!
- The&nbsp; **CH9102F USB to serial converter&nbsp;** can handle 50bps to 4Mbps max rate. (Boards shipped before May 19, 2022 used the CP2102N chip, good to 3Mbps.)

![](https://cdn-learn.adafruit.com/assets/assets/000/117/184/medium800/adafruit_products_FV2_back.jpg?1671563013)

Warning: The original Feather HUZZAH32 and the Feather ESP32 V2 are similar but not the same. In particular, the pin usages have changed. There are separate board definitions in Arduino IDE, and separate CircuitPython builds for the two boards.

However, the old and new boards are not the same. In order to add the PSRAM, and use the new Pico module, which was small enough to allow all the fun extras, some of the pin choices have changed, so here's what you need to know:

- The pin _numbers_ for the I2C port (SDA, SCL), hardware UART (RX, TX), and SPI (SCK, MOSI, MISO) have changed. If your code has hardcoded use for those pins, you'll want to replace them either by the new numbers or change the code to use the 'pretty' names like SDA or SCK.  
When selecting the new Feather ESP32 V2 board in the Espressif board support package, the correct numbers will be substituted.  
Note the names are in the same spots, we haven't changed where the I2C/UART/SPI pins are located on the board, just which ESP32 pin numbers they are connected to in the module.
- The 'corner' pin next to TX has changed from pin 21 to 37. This pin is not used in any FeatherWings because its considered an 'extra pin'. It's also changed from a GPIO to input-only
- The remaining numbered pins and A0-A5 pins have not changed pin numbers.

![](https://cdn-learn.adafruit.com/assets/assets/000/117/185/medium800/adafruit_products_FV2_top_angle.jpg?1671563035)

The module nestled in at the end of this Feather contains a dual-core ESP32 chip, 8 MB of SPI Flash, 2 MB of PSRAM, a tuned PCB antenna, and all the passives you need to take advantage of this powerful new processor. The ESP32 has both WiFi _and_&nbsp;Bluetooth Classic/LE support. That means it's perfect for just about any wireless or Internet-connected project.

Because it's part of the Adafruit [Feather eco-system, you can take advantage of the 50+ Wings](https://www.adafruit.com/category/814)&nbsp;that we've designed&nbsp;to add all sorts of cool accessories. Plus that built in battery charging and monitoring you know and love with the ESP32 Feather is still there in this upgrade.

![](https://cdn-learn.adafruit.com/assets/assets/000/117/186/medium800/adafruit_products_FV2_USB_C_side.jpg?1671563059)

 **Features:**

- **ESP32 Dual core 240MHz Xtensa®**  **processor&nbsp;** - the classic dual-core ESP32 you know and love!
- **Mini module** &nbsp;has FCC/CE certification and comes with 8 MByte of Flash and 2 MByte of PSRAM - you can have huge data buffers
- **Power options** &nbsp;- USB type C&nbsp; **or** &nbsp;Lipoly battery
- **Built-in battery charging** &nbsp;when powered over USB-C
- **LiPoly battery monitor** with two 200K resistor divider
- **Reset and User** (I38) buttons to reset board and as a separate input
- **High speed upload with auto-reset and serial debug** with ultra-reliable CP2102N chipset.
- **STEMMA QT** &nbsp;connector for I2C devices, with switchable power, so you can go into low power mode.
- **Charge/User** &nbsp;LEDs + status&nbsp; **NeoPixel&nbsp;** with pin-controlled power for low power usage
- **Low Power friendly**! In deep sleep mode we can get down to 80~100uA of current draw from the Lipoly connection. Quiescent current is from the power regulator, ESP32 chip, and Lipoly monitor. Turn off the NeoPixel and external I2C power for the lowest quiescent current draw.
- **Works with Arduino or MicroPython**

Comes fully assembled and tested, with a USB interface that lets you quickly use it with the Arduino IDE or the low-level ESP32 IDF. We also toss in some header so you can solder it in and plug into a solderless breadboard.&nbsp; **Lipoly battery and USB cable not included** &nbsp;(but we do have lots of options in the shop if you'd like!)

![](https://cdn-learn.adafruit.com/assets/assets/000/117/187/medium800/adafruit_products_FV2_JST_side.jpg?1671563077)

# Adafruit ESP32 Feather V2

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/109/500/medium800/adafruit_products_FV2_pinouts_guide.jpg?1646761754)

![](https://cdn-learn.adafruit.com/assets/assets/000/123/406/medium800/adafruit_products_Adafruit_ESP32_Feather_V2_Pinout.png?1691707257)

PrettyPins PDF [on GitHub](https://github.com/adafruit/Adafruit-ESP32-Feather-V2-PCB/blob/main/Adafruit%20ESP32%20Feather%20V2%20Pinout.pdf).

The ESP32 Feather V2 comes with plenty of GPIO and other features. This page is a detailed look at everything you get with your new board!

## Power
![](https://cdn-learn.adafruit.com/assets/assets/000/109/501/medium800/adafruit_products_FV2_power.jpg?1646765420)

### Power Pins

- **GND** - This is the common ground for all power and logic.
- **BAT** - This is the positive voltage to/from the JST connector for the optional lipoly battery.
- **USB** - This is the positive voltage to/from the USB-C connector if connected.
- **EN** - This is the 3.3V regulator's enable pin. It's pulled up, so connect to ground to disable the 3.3V regulator.
- **3V** - This is the output from the 3.3V regulator. The regulator can supply 500mA peak but half of that is drawn by the ESP32, and it's a fairly power-hungry chip. So if you need a ton of power for stuff like LEDs, motors, etc. use the **USB** or **BAT** pins, and an additional regulator.
- **RST** - The reset pin is used for the reset button, but can also be used standalone. Tie it to ground to reset the board.

### Power Connectors

The board can be powered from either of the following connectors.

- **USB-C connector** - The USB-C connector is located on the left end of the board. It is used for powering and programming the board, reading serial console output back to your computer, and charging a lipoly battery (if connected).
- **JST lipoly battery connector** - The lipoly battery connector, located to the right of the mounting hole in the upper left corner of the board, allows you to power the board via a lipoly battery, and, if also plugged into USB, charge the battery as well.

### Battery Monitor

- **LiPoly Battery Monitor** - The lipoly battery monitor, located to the left of the STEMMA QT connector, towards the center of the board, has a two 200K resistor divider.
- `VOLTAGE_MONITOR` **pin** (GPI35) - This ADC pin can be used to read the data from the battery monitor. Basically perform an analog read and multiply by two, to get a rough sense of the lipoly battery voltage.

### Charge LED

- **CHG LED** - This LED, located below the USB-C connector, and labeled CHG on the silk, lights up while the battery is charging. It is normal for it to possibly flicker while no battery is plugged in.

## ESP32
![](https://cdn-learn.adafruit.com/assets/assets/000/109/504/medium800/adafruit_products_FV2_ESP32.jpg?1646773007)

The **ESP32 Dual core 240MHz Xtensa®**  **processor** is located on the right end of the board. It comes with **8MB of flash** and **2MB of PSRAM**. There is also a tuned PCB antenna, and all the passives you need to take advantage of this powerful new processor. The ESP32 has both WiFi _and_&nbsp;Bluetooth Classic/LE support. That means it's perfect for just about any wireless or Internet-connected project.

## STEMMA QT Connector
![](https://cdn-learn.adafruit.com/assets/assets/000/109/509/medium800/adafruit_products_FV2_STEMMA_QT.jpg?1646773312)

At the top-left corner of the ESP32 module, is a **STEMMA QT connector** , labeled QT I2C on the silk. This connector allows you to connect [a variety of sensors and breakouts](https://www.adafruit.com/category/620) with STEMMA QT connectors using [various associated cables](https://www.adafruit.com/category/619). In CircuitPython, use `board.STEMMA_I2C()`. In Arduino, use `Wire`.

There is a power pin that must be pulled high for the STEMMA QT connector to work. **This is done automatically by CircuitPython and Arduino.** The pin is available in CircuitPython and in Arduino as `NEOPIXEL_I2C_POWER`.

Warning: 

For running in low power mode, you can disable (set output and `LOW`) the `NEOPIXEL_I2C_POWER` pin, this will turn off the separate 3.3V regulator that powers the QT connector's red wire

## LED and NeoPixel
![](https://cdn-learn.adafruit.com/assets/assets/000/109/510/medium800/adafruit_products_FV2_LED_NeoPixel.jpg?1646773335)

There are two controllable LEDs on the ESP32 Feather V2.

- **NeoPixel RGB LED** - This RGB LED, on `NEOPIXEL` or pin `0`, can be controlled in code to light up any color of the rainbow. Treat it like a normal WS2812B. It is available in CircuitPython is `board.NEOPIXEL`, and Arduino as `PIN_NEOPIXEL`.
- **NeoPixel Power Pin** - There is a power pin that must be pulled high for the NeoPixel to work. **This is done automatically by CircuitPython and Arduino.** The pin is available in CircuitPython and in Arduino as `NEOPIXEL_I2C_POWER` or pin `2`.
- **Red LED** - This little red LED, labeled #13 on the silk, is pin `13`. It can be controlled in code like any LED, set high to turn on. It is available in CircuitPython as `board.LED`, and Arduino as `LED_BUILTIN`.

Warning: 

## Buttons
![](https://cdn-learn.adafruit.com/assets/assets/000/109/511/medium800/adafruit_products_FV2_buttons.jpg?1646773364)

There are two buttons on the ESP32 Feather V2.

- **SW38** - This is a user readable button switch to use as an input, labeled SW38 on the silk. You can read it on pin GPI 38. Note this is an input-only pin. There is a pull-up on board. It is available in CircuitPython as `board.BUTTON`, and in Arduino as `BUTTON`.
- **Reset** - The reset button, labeled reset on the silk, is used to reboot the board.

## Logic Pins
![](https://cdn-learn.adafruit.com/assets/assets/000/109/502/medium800/adafruit_products_FV2_logic_pins.jpg?1646772881)

These are all of the GPIO pins available on the ESP32 Feather V2. Check out the PrettyPins diagram above for more details.

Warning: 

## Bottom Row

- **A0** - This is also DAC2, as well as pin 26. It uses ADC2.
- **A1** - This is also DAC1, as well as pin 25. It uses ADC2.
- **A2** - This is also pin 34. **It is input/ADC only**. It uses ADC1.
- **A3** - This is also pin 39. **It is input/ADC only**. It uses ADC1.
- **A4** - This is also pin 36. **It is input/ADC only**. It uses ADC1.
- **A5** - This is also pin 4. It uses ADC2.
- **SCK** - This is the SPI clock pin. It is also pin 5.
- **MO** - This is the SPI Microcontroller Out / Serial In (MOSI) pin. It is also pin 19.
- **MI** - This is the SPI Microcontroller In / Serial Out (MISO) pin. It is also pin 21.
- **RX** - This is the UART RX (receive) pin. It is also pin 7. Connect to the TX pin found on a breakout or device. This is separate than the 'debug UART' which is connected to the USB-to-Serial converter, so it will not interfere during upload. In Arduino, use `Serial1`.
- **TX** - This is the UART TX (transmit) pin. It is also pin 8. Connect to the RX pin found on a breakout or device. This is separate than the 'debug UART' which is connected to the USB-to-Serial converter, so it will not interfere during upload. In Arduino, use `Serial1`.
- **D37** - This is also pin I37. **It is input/ADC only**. It uses ADC1.

## Top Row

- **D13** - This is also pin 13. It uses ADC2.
- **D12** - This is also pin 12. It uses ADC2.&nbsp; **Note this is a special "boot strapping" pin on the ESP32, this pin must be low when the board is powered on/reset but can then be used as an output or input.**
- **D27** - This is also pin 27. It uses ADC2.
- **D33** - This is also pin 33. It uses ADC1.
- **D15** - This is also pin 15. It uses ADC2. This pin may have some PWM signal output during boot but can then be used as desired.
- **D32** - This is also pin 32. It uses ADC1.
- **D14** - This is also pin 14. It uses ADC2. This pin may have some PWM signal output during boot but can then be used as desired.
- **SCL** - This is the I2C clock pin. It is also pin 20.
- **SDA** - This is the I2C data pin. It is also pin 22.

Note you cannot read analog inputs on&nbsp; **ADC2** &nbsp;once WiFi has started, as it is shared with the WiFi hardware.

Warning: 

Info: 

## CH9102F USB to Serial Converter
![](https://cdn-learn.adafruit.com/assets/assets/000/111/948/medium800/adafruit_products_FV2_CH9102F.jpg?1653415009)

The **CH9102F USB to serial converter** can handle 50bps to 4Mbps max rate.

Info: 

## CP2102N USB to Serial Converter
![](https://cdn-learn.adafruit.com/assets/assets/000/109/506/medium800/adafruit_products_FV2_CP2102N.jpg?1646773220)

The **CP2102N USB to serial**  **converter** can handle 3 mbps max rate.

# Adafruit ESP32 Feather V2

## Low Power Usage

This microcontroller board can be used for low power usage thanks to the ESP32's multiple sleep modes.

There are three basic operating states to Espressif chips: normal, light sleep and deep sleep.

**Normal power** usage is as you expect: you can use the chip and run code as you like - connecting to WiFi, reading sensors, etc.

**Light sleep** is sort of a 'hibernation' - power usage is minimal and WiFi is disconnected, but the internal clock and memory is kept. That means you can wake up where you left off, in the middle of the code as desired. You'll still need to re-initialize any external hardware that got disconnected, and WiFi, but it's often faster than waking from a deep sleep

**Deep sleep** is the lowest power but the tradeoff is that all memory and state is lost - the only thing that's running is the real time clock that can wake the chip up. When woken up, the chip starts as if it was physically reset - from the beginning of the code. This can be beneficial if you want to have a fresh start each time

A _rough_ guideline is:

- Normal power: 100mA+ can be as much power as need and spike during WiFi connection
- Light sleep: 2mA assuming all external hardware is de-powered
- Deep sleep: 100uA assuming all external hardware is de-powered

The Adafruit ESP32 Feather V2 has a `NEOPIXEL_I2C_POWER` pin that controls power to I2C and the NeoPixel LED. This pin is automatically pulled HIGH in both CircuitPython and Arduino. Disabling this pin by setting it to an output and LOW allows you to drop the power draw, even when you have I2C sensors or breakouts connected.

Here's a generic sketch we use for all our boards that has a macro-defined section for enabling and disabling all external powered elements. For example, if there's a power pin for NeoPixels, I2C port, TFT, etc...we turn that off before going into light or deep sleep! This will minimize power usage

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Adafruit_ESP32_Arduino_Demos/ESP32_sleeptest/ESP32_sleeptest.ino

The best way to really test power draw is with a specialty power meter such as the Nordic PPK 2

### Nordic nRF-PPK2 - Power Profiler Kit II

[Nordic nRF-PPK2 - Power Profiler Kit II](https://www.adafruit.com/product/5048)
The **Power Profiler Kit II** &nbsp;is a standalone unit, which can measure and optionally supply currents all the way from sub-uA and as high as 1A on all Nordic DKs, in addition to external hardware. [As we've featured on...](https://www.youtube.com/watch?v=60q8QCiYhjc)

In Stock
[Buy Now](https://www.adafruit.com/product/5048)
[Related Guides to the Product](https://learn.adafruit.com/products/5048/guides)
![Angled shot of Nordic nrF Power Profiler board.](https://cdn-shop.adafruit.com/640x480/5048-00.jpg)

When running the above code and monitoring with a PPK, you'll get a graph like this:

![](https://cdn-learn.adafruit.com/assets/assets/000/109/375/medium800/low_power_esp32_qtpy_esp32pico_sleepcycle.png?1645930315)

The big pulse is normal mode, you can see the ESP32 booting up, loading code, and then pausing 1 second. Then there's a big drop for one sec to light sleep, and finally one more 1 second pause at deep sleep.

## Power Draw for ESP32 Feather V2

The following graphs show the power draw for the ESP32 Feather V2 in normal power mode, light sleep mode, and deep sleep mode.

### Normal Power Mode
![](https://cdn-learn.adafruit.com/assets/assets/000/109/592/medium800/adafruit_products_FV2_normal_power_mode.png?1646856255)

The power draw, running normally (without WiFi), is 40mA.

### Light Sleep Mode
![](https://cdn-learn.adafruit.com/assets/assets/000/109/593/medium800/adafruit_products_FV2_light_sleep_mode.png?1646856297)

The power draw in light sleep mode is 1.1mA.

### Deep Sleep Mode
![](https://cdn-learn.adafruit.com/assets/assets/000/109/594/medium800/adafruit_products_FV2_deep_sleep_mode.png?1646856524)

The power draw in deep sleep mode is 70uA.

# Adafruit ESP32 Feather V2

## Power Management

![](https://cdn-learn.adafruit.com/assets/assets/000/114/163/medium800/adafruit_products_52288007621_0da60dd2a5_o.jpg?1660595228)

# Battery + USB Power

We wanted to make our Feather boards easy to power both when connected to a computer as well as via battery.

There's **two ways to power** a Feather:

1. You can connect with a USB cable (just plug into the jack) and the Feather will regulate the 5V USB down to 3.3V.
2. You can also connect a 4.2/3.7V Lithium Polymer (LiPo/LiPoly) or Lithium Ion (LiIon) battery to the JST jack. This will let the Feather run on a rechargeable battery.

**When the USB power is powered, it will automatically switch over to USB for power, as well as start charging the battery (if attached).** This happens 'hot-swap' style so you can always keep the LiPoly connected as a 'backup' power that will only get used when USB power is lost.

Danger: 

![](https://cdn-learn.adafruit.com/assets/assets/000/113/820/medium800/adafruit_products_power.jpg?1659377095)

The above shows the USB-C jack (left), LiPoly JST jack (top left), as well as the changeover diode (just to the right of the JST jack) and the LiPoly charging circuitry (to the right of the JST jack).

There's also a **CHG** LED next to the USB jack, which will light up while the battery is charging. This LED might also flicker if the battery is not connected, it's normal.

Info: 

# Power Supplies

You have a lot of power supply options here! We bring out the **BAT** pin, which is tied to the LiPoly JST connector, as well as **USB** which is the +5V from USB if connected. We also have the **3V** pin which has the output from the 3.3V regulator. We use a 500mA peak regulator. While you can get 500mA from it, you can't do it continuously from 5V as it will overheat the regulator.

It's fine for, say, powering an ESP8266 WiFi chip or XBee radio though, since the current draw is 'spikey' & sporadic.

![](https://cdn-learn.adafruit.com/assets/assets/000/113/821/medium800/adafruit_products_power_pins.jpg?1659377194)

# Measuring Battery

If you're running off of a battery, chances are you wanna know what the voltage is at! That way you can tell when the battery needs recharging. LiPoly batteries are 'maxed out' at 4.2V and stick around 3.7V for much of the battery life, then slowly sink down to 3.2V or so before the protection circuitry cuts it off. By measuring the voltage you can quickly tell when you're heading below 3.7V.

To make this easy we stuck a double-200K resistor divider on the **BAT** &nbsp;pin, and connected it to&nbsp; **A13** &nbsp;which is not exposed on the feather breakout.

In Arduino, you can read this pin's voltage, then double it, to get the battery voltage.

```cpp
// Arduino Example Code snippet

#define VBATPIN A13

float measuredvbat = analogReadMilliVolts(VBATPIN);
measuredvbat *= 2;    // we divided by 2, so multiply back
measuredvbat /= 1000; // convert to volts!
Serial.print("VBat: " ); Serial.println(measuredvbat);
```

# ENable pin

If you'd like to turn off the 3.3V regulator, you can do that with the **EN** (able) pin. Simply tie this pin to **Ground** and it will disable the 3V regulator. The **BAT** and **USB** pins will still be powered.

![](https://cdn-learn.adafruit.com/assets/assets/000/113/823/medium800/adafruit_products_enable.jpg?1659377425)

# STEMMA QT Power

The ESP32 Feather V2 is equipped with a STEMMA QT port which is connected to its own regulator. Unlike the one controlled by the ENable pin, this one is controlled by GPIO. The NeoPixel and STEMMA power pin is enabled by default in Arduino. You can disable it manually for low power usage. The pin is available in Arduino as `NEOPIXEL_I2C_POWER`.

Warning: 

![](https://cdn-learn.adafruit.com/assets/assets/000/113/834/medium800/adafruit_products_stemma-neo.jpg?1659388472)

# Alternative Power Options

The two primary ways for powering a feather are a 3.7/4.2V LiPo battery plugged into the JST port _or_ a USB power cable.

If you need other ways to power the Feather, here's what we recommend:

- For permanent installations, a [5V 1A USB wall adapter](https://www.adafruit.com/product/501) will let you plug in a USB cable for reliable power
- For mobile use, where you don't want a LiPoly, [use a USB battery pack!](https://www.adafruit.com/product/1959)
- If you have a higher voltage power supply, [use a 5V buck converter](https://www.adafruit.com/?q=5V%20buck) and wire it to a [USB cable's 5V and GND input](https://www.adafruit.com/product/3972)

Here's what you cannot do:

- **Do not use alkaline or NiMH batteries** and connect to the battery port - this will destroy the LiPoly charger
- **Do not use 7.4V RC batteries on the battery port** - this will destroy the board

The Feather _is not designed for external power supplies_ - this is a design decision to make the board compact and low cost. It is not recommended, but technically possible:

- **Connect an external 3.3V power supply to the 3V and GND pins.** Not recommended, this may cause unexpected behavior and the **EN** pin will no longer work. Also this doesn't provide power on **BAT** or **USB** and some Feathers/Wings use those pins for high current usages. You may end up damaging your Feather.
- **Connect an external 5V power supply to the USB and GND pins.** Not recommended, this may cause unexpected behavior when plugging in the USB port because you will be back-powering the USB port, which _could_ confuse or damage your computer.

# Adafruit ESP32 Feather V2

## CircuitPython

[CircuitPython](https://github.com/adafruit/circuitpython) is a derivative of [MicroPython](https://micropython.org) designed to simplify experimentation and education on low-cost microcontrollers. It makes it easier than ever to get prototyping by requiring no upfront desktop software downloads. ESP32 CircuitPython firmware is uploaded to the board via the USB serial port.

Follow this step-by-step to get CircuitPython running on your board.

## Driver Install

If this is your first time using an ESP32 board on Windows or MacOS, you may need to install the USB to serial drivers. There are two options for the USB to serial chipset on your board. If you are unsure which one you have, install both drivers.

For instructions and more information regarding the CH9102F chip and driver install, please visit the [How To Install Drivers for WCH USB to Serial Chips guide](https://learn.adafruit.com/how-to-install-drivers-for-wch-usb-to-serial-chips).

For driver downloads for the CP2104 and CP2012N, please visit the [Silicon Labs Downloads page](https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads).

For those running Linux, the drivers are already included.

## CircuitPython Download
Warning: Make sure you use the Adafruit Feather ESP32 V2 CircuitPython download for this board. It is not compatible with the Feather HUZZAH32 download.

[Download the latest version of CircuitPython for this board via circuitpython.org](https://circuitpython.org/board/adafruit_feather_esp32_v2/)
 **Click the link above to download the latest CircuitPython .bin file.**

Save it wherever is convenient for you.

![install_circuitpython_on_esp32_ESP32_CircuitPython_bin_downloaded.png](https://cdn-learn.adafruit.com/assets/assets/000/114/559/medium640/install_circuitpython_on_esp32_ESP32_CircuitPython_bin_downloaded.png?1661800263)

## Connecting to the Web Flasher

To begin, **plug your board into your computer via USB, using**  **a known-good data-sync cable** , directly, or via an adapter if needed.

**You will have to use the Chrome or a Chromium-based browser to install CircuitPython.** [For example, Edge and Opera are Chromium based](https://en.wikipedia.org/wiki/Chromium_(web_browser)).

Safari and Firefox, etc are _not_ supported - [they have not implemented Web Serial](https://developer.mozilla.org/en-US/docs/Web/API/Serial#browser_compatibility)!

In the **Chrome browser** visit [https://adafruit.github.io/Adafruit\_WebSerial\_ESPTool/](https://adafruit.github.io/Adafruit_WebSerial_ESPTool/)

The main page of the ESP Web Flasher should look something like this.

Note: The site now displays an alert that it is no longer maintained, and suggests using a different option. The ESP Web Flasher has still proven to be more consistent and easier to use, so it is highly suggested that you continue with this version.

![install_circuitpython_on_esp32_with_boot_button_ESPCP_web_flasher_main_page.png](https://cdn-learn.adafruit.com/assets/assets/000/114/594/medium640/install_circuitpython_on_esp32_with_boot_button_ESPCP_web_flasher_main_page.png?1661892930)

 **You should remove all other USB devices so**  **_only_ the target board is attached.** This eliminates confusion over multiple ports!

Press the&nbsp; **Connect** button in the top right of the web browser. You will get a pop up asking you to select the COM or Serial port. Look for **USB Single Serial**.

On some systems, such as MacOS, there may be additional system ports that appear in the list (as shown in the image).

![install_circuitpython_on_esp32_with_boot_button_ESPCP_connect_and_ports.png](https://cdn-learn.adafruit.com/assets/assets/000/114/595/medium640/install_circuitpython_on_esp32_with_boot_button_ESPCP_connect_and_ports.png?1661893121)

The Javascript code will now try to connect to the board. It may timeout for a bit until it succeeds. On success, you will see that it is **Connected** &nbsp;and will print out a unique&nbsp; **MAC address** identifying the board along with other information that was detected.

![install_circuitpython_on_esp32_with_boot_button_ESPCP_flasher_connection_success.png](https://cdn-learn.adafruit.com/assets/assets/000/114/596/medium640/install_circuitpython_on_esp32_with_boot_button_ESPCP_flasher_connection_success.png?1661893862)

Once you have successfully connected, the command toolbar will appear.

![install_circuitpython_on_esp32_with_boot_button_ESPCP_command_tool_bar.png](https://cdn-learn.adafruit.com/assets/assets/000/114/597/medium640/install_circuitpython_on_esp32_with_boot_button_ESPCP_command_tool_bar.png?1661893964)

## Erasing the Board Contents

If you would like to erase the entire flash area so that you can start with a clean slate, you can use the erase feature. We recommend doing this every time before installing or updating CircuitPython.

To erase the contents, click the **Erase** button. You will be prompted as to whether you want to continue. Click **OK** to continue. If you do not wish to continue, click Cancel.

![install_circuitpython_on_esp32_ESPCP_click_erase_ok.png](https://cdn-learn.adafruit.com/assets/assets/000/114/630/medium640/install_circuitpython_on_esp32_ESPCP_click_erase_ok.png?1661976027)

You'll see "Erasing flash memory. Please wait..." This will eventually be followed by "Finished." and the amount of time it took to erase.

**Do not disconnect!** Immediately continue on to Programming the Board.

![install_circuitpython_on_esp32_ESPCP_erase_finished.png](https://cdn-learn.adafruit.com/assets/assets/000/114/632/medium640/install_circuitpython_on_esp32_ESPCP_erase_finished.png?1661976226)

Warning: 

## Programming the Board
You can click on **Choose a file...** from any of the available buttons. It will only attempt to program buttons with a file and a unique location. Select the&nbsp; **.bin** file you downloaded at the beginning of this page from the file chooser dialogue.

Verify that the **Offset** box next to the file location you used is 0x0. The offset defaults to 0x0, so unless you changed it manually, it should be good to go.

![install_circuitpython_on_esp32_ESPCP_choose_a_file.png](https://cdn-learn.adafruit.com/assets/assets/000/114/633/medium640/install_circuitpython_on_esp32_ESPCP_choose_a_file.png?1661976639)

![install_circuitpython_on_esp32_ESPCP_bin_to_upload.png](https://cdn-learn.adafruit.com/assets/assets/000/114/669/medium640/install_circuitpython_on_esp32_ESPCP_bin_to_upload.png?1661979129)

Once you choose a file, the button text will change to match your filename. You can then click the **Program** button to start flashing.

![install_circuitpython_on_esp32_ESPCP_bin_loaded_press_program.png](https://cdn-learn.adafruit.com/assets/assets/000/114/655/medium640/install_circuitpython_on_esp32_ESPCP_bin_loaded_press_program.png?1661978037)

A progress bar will appear and after a minute or two, you will have written the firmware.

![install_circuitpython_on_esp32_ESPCP_programming_the_bin.png](https://cdn-learn.adafruit.com/assets/assets/000/114/656/medium640/install_circuitpython_on_esp32_ESPCP_programming_the_bin.png?1661978267)

You've now successfully programmed CircuitPython onto your board! As suggested in the output, press reset to run the new firmware.

![install_circuitpython_on_esp32_ESPCP_programming_complete.png](https://cdn-learn.adafruit.com/assets/assets/000/114/668/medium640/install_circuitpython_on_esp32_ESPCP_programming_complete.png?1661978790)

As the ESP32 does not have native USB, no USB drive will show up on your computer when you reset. With CircuitPython firmware loaded, the REPL can be accessed over a serial/COM port.

For more details on installation, how to configure your ESP32, and info on getting started with CircuitPython on your ESP32 using the Web Workflow, check out the [CircuitPython on ESP32 Quick Start guide](https://learn.adafruit.com/circuitpython-with-esp32-quick-start).

# Adafruit ESP32 Feather V2

## CircuitPython on ESP32 Quick Start

# Adafruit ESP32 Feather V2

## Arduino IDE Setup

You need to install the right USB-to-serial driver for your chip in addition to the Arduino IDE. If you are unsure which is the right one, install both!

### Install Arduino IDE

The first thing you will need to do is to download the latest release of the Arduino IDE. You will need to&nbsp;be using&nbsp; **version 1.8** &nbsp;or higher for this guide

[Arduino IDE Download](http://www.arduino.cc/en/Main/Software)
### Install CP2104 / CP2102N USB Driver

The USB-to-Serial converter that talks to the ESP32 chip itself will need a driver on your computer's operating system. The driver is available for Mac and Windows. It is already built into Linux.

[Click here to download the CP2104 USB Driver](http://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers)
### Install CH9102 / CH34X USB Driver

Newer ESP32 boards have a different USB-to-serial converter that talks to the chip itself, and will need a driver on your computer's operating system. The driver is available for Mac and Windows. It is already built into Linux.

If you would like more detail, check out [the guide on installing these drivers](https://learn.adafruit.com/how-to-install-drivers-for-wch-usb-to-serial-chips).

[Click here to download the Windows driver](http://www.wch-ic.com/downloads/CH341SER_ZIP.html)
[Click here to download the Mac driver](http://www.wch-ic.com/downloads/CH34XSER_MAC_ZIP.html)
### Install ESP32 Board Support Package

After you have downloaded and installed **&nbsp;the latest version of Arduino IDE** , you will need to start the IDE&nbsp;and navigate to&nbsp;the&nbsp; **Preferences** &nbsp;menu. You can access it from the&nbsp; **File** &nbsp;menu in&nbsp;_Windows_&nbsp;or&nbsp;_Linux_, or the&nbsp; **Arduino** &nbsp;menu on&nbsp;_OS X_.

![](https://cdn-learn.adafruit.com/assets/assets/000/101/639/medium800/esp32_s2_arduino_ide_setup_flora_prefs.png?1618870383)

A dialog will pop up just like the one shown below.

![](https://cdn-learn.adafruit.com/assets/assets/000/101/640/medium800/esp32_s2_arduino_ide_setup_flora_Screen_Shot_2015-05-07_at_9.07.21_AM.png?1618870405)

We will be adding a URL to the new&nbsp; **Additional Boards Manager URLs** &nbsp;option. The list of URLs is comma separated, and&nbsp;_you will only have to add each&nbsp;URL once._&nbsp;New Adafruit boards and updates to existing boards&nbsp;will automatically be picked up&nbsp;by the Board Manager each time&nbsp;it is opened. The URLs point to index files that the Board Manager uses to build the list of available & installed boards.

To find the most up to date list of URLs you can&nbsp;add, you can visit the list of&nbsp;[third party board URLs on the Arduino IDE wiki](https://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls#list-of-3rd-party-boards-support-urls). We will only need to add one URL to the IDE in this example, but&nbsp;_ **you can add multiple URLS by separating them with commas** _. Copy and paste the link below into the&nbsp; **Additional Boards Manager URLs** &nbsp;option in the Arduino IDE preferences.

`https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json`

![](https://cdn-learn.adafruit.com/assets/assets/000/101/641/medium800/esp32_s2_arduino_ide_setup_Screen_Shot_2021-04-19_at_3.14.19_PM.png?1618870509)

If you have multiple boards you want to support, say ESP8266 and Adafruit, have both URLs in the text box separated by a comma (,)

Once done click&nbsp; **OK** &nbsp;to save the new preference settings.

The next step is to actually install the Board Support Package (BSP). Go to the **Tools → Board → Board Manager** &nbsp;submenu. A dialog should come up with various BSPs. Search for **esp32**.

![](https://cdn-learn.adafruit.com/assets/assets/000/107/162/medium800/esp32_s2_arduino_ide_setup_Screen_Shot_2021-12-09_at_9.58.40_AM.png?1639072797)

Click the **Install** button and wait for it to finish. Once it is finished, you can close the dialog.

In the **Tools → Board** submenu you should see **ESP32 Arduino** and in that dropdown it should contain the ESP32 boards along with all the latest ESP32 boards.

Warning: Make sure you choose the Adafruit Feather ESP32 V2 board in Arduino IDE. It is not the same as the Adafruit Feather ESP32 board, which is the older board.

Look for the **Adafruit Feather ESP32 V2**.

![](https://cdn-learn.adafruit.com/assets/assets/000/122/485/medium800/adafruit_products_ESP32V2_Arduino_IDE_board.png?1689108512)

The upload speed can be changed: faster speed makes uploads take less time but sometimes can cause upload issues. **921600** should work fine, but if you're having issues, you can drop down lower.

# Adafruit ESP32 Feather V2

## Blink

The first and most basic program you can upload to your Arduino is the classic Blink sketch. This takes something on the board and makes it, well, blink! On and off. It's a great way to make sure everything is working and you're uploading your sketch to the right board and right configuration.

When all else fails, you can always come back to Blink!

![](https://cdn-learn.adafruit.com/assets/assets/000/109/609/medium800thumb/adafruit_products_FV2_Arduino_Blink.jpg?1647029815)

# Pre-Flight Check: Get Arduino IDE & Hardware Set Up

This lesson assumes you have Arduino IDE set up. This is a generalized checklist, some elements may not apply to your hardware. If you haven't yet, check the previous steps in the guide to make sure you:

- **Install the very latest Arduino IDE for Desktop** (not all boards are supported by the Web IDE so we don't recommend it)
- **Install any board support packages (BSP) required for your hardware.** Some boards are built in defaults on the IDE, but lots are not! You may need to install plug-in support which is called the BSP.
- **Get a Data/Sync USB cable for connecting your hardware.** A _significant_ amount of problems folks have stem from not having a USB cable with data pins. Yes, these cursed cables roam the land, making your life hard. If you find a USB cable that doesn't work for data/sync, _throw it away immediately_! There is no need to keep it around, cables are very inexpensive these days.
- **Install any drivers required** - If you have a board with a FTDI or CP210x chip, you may need to get separate drivers. If your board has native USB, it probably doesn't need anything. After installing, reboot to make sure the driver sinks in.
- **Connect the board to your computer.** If your board has a power LED, make sure it's lit. Is there a power switch? Make sure its turned On!

The Feather ESP32 V2 has no power LED or power switch. Make sure you download the CP2104 / CP2102N USB Driver if you haven't already. Check out the [IDE Setup page](https://learn.adafruit.com/adafruit-esp32-feather-v2/arduino-ide-setup) for details.

# Start up Arduino IDE and Select Board/Port

OK now you are prepared! Open the Arduino IDE on your computer. Now you have to tell the IDE what board you are using, and how you want to connect to it.

In the IDE find the **Tools** menu. You will use this to select the board. If you switch boards, you _must switch the selection!_ So always double-check before you upload code in a new session.

![](https://cdn-learn.adafruit.com/assets/assets/000/109/607/medium800/adafruit_products_FV2_tools_setup.png?1647029160)

# New Blink Sketch

OK lets make a new blink sketch! From the **File** menu, select **New**

![](https://cdn-learn.adafruit.com/assets/assets/000/107/498/medium800/blink__image.png?1640454932)

Then in the new window, copy and paste this text:

```auto
int led = LED_BUILTIN;

void setup() {
  // Some boards work best if we also make a serial connection
  Serial.begin(115200);

  // set LED to be an output pin
  pinMode(led, OUTPUT);
}

void loop() {
  // Say hi!
  Serial.println("Hello!");
  
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);                // wait for a half second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(500);                // wait for a half second
}
```

Info: 

One note you'll see is that we reference the LED with the constant `LED_BUILTIN` rather than a number. That's because, historically, the built in LED was on pin 13 for Arduinos. But in the decades since, boards don't always have a pin 13, or maybe it could not be used for an LED. So the LED could have moved to another pin. It's best to use `LED_BUILTIN` so you don't get the pin number confused!

The red LED on the Feather ESP32 V2 is available as `LED_BUILTIN`, as well as `13`.

# Verify (Compile) Sketch

OK now you can click the Verify button to convert the sketch into binary data to be uploaded to the board.

Note that Verifying a sketch is the same as Compiling a sketch - so we will use the words interchangeably

![](https://cdn-learn.adafruit.com/assets/assets/000/107/503/medium800/blink__image.png?1640455847)

During verification/compilation, the computer will do a bunch of work to collect all the libraries and code and the results will appear in the bottom window of the IDE

![](https://cdn-learn.adafruit.com/assets/assets/000/107/500/medium800/blink__image.png?1640455335)

If something went wrong with compilation, you will get red warning/error text in the bottom window letting you know what the error was. It will also highlight the line with an error

For example, here I had the wrong board selected - and the selected board does not have a built in LED!

![](https://cdn-learn.adafruit.com/assets/assets/000/107/501/medium800/blink__image.png?1640455513)

Here's another common error, in my haste I forgot to add a `;` at the end of a line. The compiler warns me that it's looking for one - note that the error is actually a few lines up!

![](https://cdn-learn.adafruit.com/assets/assets/000/107/502/medium800/blink__image.png?1640455650)

Info: Turning on detailed compilation warnings and output can be very helpful sometimes - It's in Preferences under "Show Verbose Output During:" and check the Compilation button. If you ever need to get help from others, be sure to do this and then provide all the text that is output. It can assist in determining what happened!

On success you will see something like this white text output and the message **Done compiling.** in the message area.

![](https://cdn-learn.adafruit.com/assets/assets/000/107/504/medium800/blink__image.png?1640455995)

# Upload Sketch

Once the code is verified/compiling cleanly you can upload it to your board. Click the **Upload** button

![](https://cdn-learn.adafruit.com/assets/assets/000/107/499/medium800/blink__image.png?1640455265)

The IDE will try to compile the sketch again for good measure, then it will try to connect to the board and upload a the file.

**This is actually one of the hardest parts for beginners because it's where a lot of things can go wrong.**

However, lets start with what it looks like on success! Here's what your board upload process looks like when it goes right:

![](https://cdn-learn.adafruit.com/assets/assets/000/109/608/medium800/adafruit_products_FV2_Arduino_blink_success.png?1647029354)

Often times you will get a warning like this, which is kind of vague:

`No device found on COM66` (or whatever port is selected)  
`An error occurred while uploading the sketch`

![](https://cdn-learn.adafruit.com/assets/assets/000/107/505/medium800/blink__image.png?1640456582)

This could be a few things.

First up, **check again that you have the correct board selected!** Many electronics boards have very similar names or look, and often times folks grab a board different from what they thought.

Second, **make sure you selected the right port!** If you have the wrong port or no port selected, Arduino doesn't know where to look for your board.

If both of those are correct, the next step is to enable verbose upload messages.

Before continuing we _really really_ suggest turning on **Verbose Upload** messages, it will help in this process because you will be able to see what the IDE is trying to do. It's a checkbox in the **Preferences** menu.

![](https://cdn-learn.adafruit.com/assets/assets/000/107/507/medium800/blink__image.png?1640457254)

Now you can try uploading again!

![](https://cdn-learn.adafruit.com/assets/assets/000/107/506/medium800/blink__image.png?1640457185)

This time, you should have success!

After uploading this way, be sure to **click the reset button** - it sort of makes sure that the board got a good reset and will come back to life nicely.

# Finally, a Blink!

OK it was a journey but now we're here and you can enjoy your blinking LED. Next up, try to change the delay between blinks and re-upload. It's a good way to make sure your upload process is smooth and practiced.

![](https://cdn-learn.adafruit.com/assets/assets/000/109/610/medium800thumb/adafruit_products_FV2_Arduino_Blink.jpg?1647029830)

# Adafruit ESP32 Feather V2

## I2C Scan Test

A lot of sensors, displays, and devices can connect over I2C. I2C is a 2-wire 'bus' that allows multiple devices to all connect on one set of pins so it's very convenient for wiring!

When using your board, you'll probably want to connect up I2C devices, and it can be a little tricky the first time. The best way to debug I2C is go through a checklist and then perform an I2C scan

# Common I2C Connectivity Issues

- **Have you connected four wires (at a minimum) for each I2C device?** Power the device with whatever is the logic level of your microcontroller board (probably 3.3V), then a ground wire, and a SCL clock wire, and and a SDA data wire.
- **If you're using a STEMMA QT board - check if the power LED is lit.** It's usually a green LED to the left side of the board.
- **Does the STEMMA QT/I2C port have switchable power or pullups?** To reduce power, some boards have the ability to cut power to I2C devices or the pullup resistors. Check the documentation if you have to do something special to turn on the power or pullups.
- **If you are using a DIY I2C device, do you have pullup resistors?** Many boards do _not_ have pullup resistors built in and they are _required!_ We suggest any common 2.2K to 10K resistors. You'll need two: one each connects from SDA to positive power, and SCL to positive power. Again, positive power (a.k.a VCC, VDD or V+) is often 3.3V
- **Do you have an address collision?** You can only have _one_ board per address. So you cannot, say, connect two AHT20's to one I2C port because they have the same address and will interfere. Check the sensor or documentation for the address. Sometimes there are ways to adjust the address.
- **Does your board have multiple I2C ports?** Historically, boards only came with one. But nowadays you can have two or even three! This can help solve the "hey, but what if I want two devices with the same address" problem: just put one on each bus.
- **Are you hot-plugging devices?** I2C does _not_ support dynamic re-connection, you cannot connect and disconnect sensors as you please. They should all be connected on boot and not change. ([Only exception is if you're using a hot-plug assistant but that'll cost you](https://www.adafruit.com/product/5159)).
- **Are you keeping the total bus length reasonable?** I2C was designed for maybe 6" max length. We like to push that with plug-n-play cables, but really please keep them as short as possible! ([Only exception is if you're using an active bus extender](https://www.adafruit.com/product/4756)).

The Feather ESP32 V2 does **not** have I2C pullup resistors - make sure any sensor you attach to the I2C port has resistors or add them yourself.

The Feather ESP32 V2 has a `NEOPIXEL_I2C_POWER` pin that must be pulled `HIGH` to enable power to the STEMMA QT port. Without it, the QT port will not work!

# Perform an I2C scan!

### Install TestBed Library

To scan I2C, the Adafruit TestBed library is used. This library and example just makes the scan a little easier to run because it takes care of some of the basics. You will need to add support by installing the library. Good news: it is _very easy_ to do it. Go to the **Arduino Library Manager.**

![](https://cdn-learn.adafruit.com/assets/assets/000/107/555/medium800/i2c_scan_test_installlib.png?1640562425)

Search for **TestBed** and install the **Adafruit TestBed** library

![](https://cdn-learn.adafruit.com/assets/assets/000/107/556/medium800/i2c_scan_test_testbedlib.png?1640562581)

Now open up the I2C Scan example

![](https://cdn-learn.adafruit.com/assets/assets/000/107/557/medium800/i2c_scan_test_i2cscan.png?1640562632)

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/I2C_Scanners/arduino/i2c_scanner/i2c_scanner.ino

### Wire up I2C device

While the examples here will be using the [Adafruit MCP9808](https://www.adafruit.com/product/5027), a high accuracy temperature sensor, the overall process is the same for just about any I2C sensor or device.

The first thing you'll want to do is get the sensor connected so your board has I2C to talk to.

### Adafruit MCP9808 High Accuracy I2C Temperature Sensor Breakout

[Adafruit MCP9808 High Accuracy I2C Temperature Sensor Breakout](https://www.adafruit.com/product/5027)
The MCP9808 digital temperature sensor is one of the more accurate/precise we've ever seen, with a typical accuracy of ±0.25°C over the sensor's -40°C to +125°C range and precision of +0.0625°C. They work great with any microcontroller using standard I2C. With...

Out of Stock
[Buy Now](https://www.adafruit.com/product/5027)
[Related Guides to the Product](https://learn.adafruit.com/products/5027/guides)
![Top view of temperature sensor breakout above an OLED display FeatherWing. The OLED display reads "MCP9808 Temp: 24.19ºC"](https://cdn-shop.adafruit.com/640x480/5027-04.jpg)

### STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long

[STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long](https://www.adafruit.com/product/4399)
This 4-wire cable is&nbsp;50mm / 1.9" long and fitted with JST SH female 4-pin connectors on both ends. Compared with the chunkier JST PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/4399)
[Related Guides to the Product](https://learn.adafruit.com/products/4399/guides)
![Angled of of JST SH 4-Pin Cable.](https://cdn-shop.adafruit.com/640x480/4399-00.jpg)

## Wiring the MCP9808

The MCP9808 comes with a STEMMA QT connector, which makes wiring it up quite simple and solder-free.

Simply plug a **STEMMA QT to STEMMA QT cable** into **the port on the Feather V2** , and **a port on the MCP9808 breakout**.

![adafruit_products_FV2_MCP9808_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/109/613/medium640/adafruit_products_FV2_MCP9808_bb.jpg?1647030664)

Now upload the scanning sketch to your microcontroller and open the serial port to see the output. You should see something like this:

![](https://cdn-learn.adafruit.com/assets/assets/000/109/614/medium800/adafruit_products_FV2_I2C_scan_test_MCP9808.png?1647030815)

# Adafruit ESP32 Feather V2

## WiFi Test

Thanksfully if you have ESP32 sketches, they'll 'just work' with variations of ESP32. You can find a wide range of examples in the **File-\>Examples-\>Examples for Adafruit Metro ESP32-S2** subheading (the name of the board may vary so it could be **"Examples for Adafruit Feather ESP32 V2"** etc)

![](https://cdn-learn.adafruit.com/assets/assets/000/097/028/medium800/adafruit_products_image.png?1605222761)

Let's start by scanning the local networks.

**Load up the WiFiScan example** under **Examples-\>Examples for YOUR BOARDNAME-\>WiFi-\>WiFiScan**

![](https://cdn-learn.adafruit.com/assets/assets/000/096/993/medium800/adafruit_products_Screen_Shot_2020-11-11_at_12.28.51_PM.png?1605115789)

And **upload this example to your board**. The ESP32 should scan and find WiFi networks around you.

For ESP32, open the serial monitor, to see the scan begin.

For ESP32-S2, -S3 and -C3, don't forget you have to click Reset after uploading through the ROM bootloader. Then select the new USB Serial port created by the ESP32. It will take a few seconds for the board to complete the scan.

![](https://cdn-learn.adafruit.com/assets/assets/000/097/029/medium800/adafruit_products_image.png?1605223012)

If you can not scan any networks, check your power supply. You need a solid power supply in order for the ESP32 to not brown out. A skinny USB cable or drained battery can cause issues.

## WiFi Connection Test

Now that you can scan networks around you, its time to connect to the Internet!

Copy the example below and paste it into the Arduino IDE:

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/ESP32_S2_WiFi_Tests/WiFiWebClient/WiFiWebClient.ino

 **NOTE:** You must **change the `SECRET_SSID` and `SECRET_PASS` in the example code to your WiFi SSID and password** before uploading this to your board.

![](https://cdn-learn.adafruit.com/assets/assets/000/097/030/medium800/adafruit_products_image.png?1605223125)

After you've set it correctly, upload and check the serial monitor. You should see the following. If not, go back, check wiring, power and your SSID/password

![](https://cdn-learn.adafruit.com/assets/assets/000/097/009/medium800/adafruit_products__dev_cu_usbmodem14101.png?1605127946)

## Secure Connection Example

Many servers today do not allow non-SSL connectivity. Lucky for you the ESP32 has a great TLS/SSL stack so you can have that all taken care of for you. Here's an example of a using a secure WiFi connection to connect to the Twitter API.

Copy and paste it into the Arduino IDE:

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/ESP32_S2_WiFi_Tests/WiFiSSLClient/WiFiSSLClient.ino

As before, **update the ssid and password first** , then upload the example to your board.

Note we use `WiFiClientSecure client` instead of `WiFiClient client;` to require a SSL connection!&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/097/010/medium800/adafruit_products__dev_cu_usbmodem14101.png?1605128497)

# Adafruit ESP32 Feather V2

## WipperSnapper Setup

Warning: 

## What is WipperSnapper

WipperSnapper is a firmware designed to turn any WiFi-capable board into an Internet-of-Things device without programming a single line of code. WipperSnapper connects to [Adafruit IO](https://io.adafruit.com/), a web&nbsp;platform designed ([by Adafruit!](https://www.adafruit.com/about)) to&nbsp;_display_,&nbsp;_respond_, and&nbsp;_interact_&nbsp;with your project's data.

Simply load the WipperSnapper firmware onto your board, add credentials, and plug it into power. Your board will automatically register itself with your Adafruit IO account.

From there, you can add&nbsp;_components_&nbsp;to your board such as buttons, switches, potentiometers, sensors, and more! Components are&nbsp;_dynamically&nbsp;_added to hardware, so you can&nbsp;immediately start interacting, logging, and streaming the data your projects produce without writing code.

## Sign up for Adafruit.io

You will need an Adafruit IO account to use WipperSnapper on your board. If you do not already have one, head over to [io.adafruit.com](https://io.adafruit.com/) to create a&nbsp;_free_ account.

## Add a New Device to Adafruit IO

Log into your [Adafruit IO](https://io.adafruit.com/) account. Click the _New Device_ button at the top of the page.

![](https://cdn-learn.adafruit.com/assets/assets/000/112/548/medium800/wippersnapper_setup__board_selector__web__new_device_1.png?1655919766)

After clicking New Device, you should be on the _board selector_ page. This page displays every board that is compatible with the WipperSnapper firmware.

![](https://cdn-learn.adafruit.com/assets/assets/000/112/550/medium800/wippersnapper_setup__board_selector__web__selector_maion.png?1655920178)

In the board selector page's search bar, search for the&nbsp;_Feather ESP32 V2.&nbsp;_Once you've located the board you'd like to install WipperSnapper on,_&nbsp;_click the&nbsp;_Choose Board_&nbsp;button to bring you to the self-guided installation wizard.

![](https://cdn-learn.adafruit.com/assets/assets/000/112/890/medium800/adafruit_products_v2_new_board.png?1657137703)

Follow the step-by-step instructions on the page to install Wippersnapper on your device and connect it to Adafruit IO.

![](https://cdn-learn.adafruit.com/assets/assets/000/120/544/medium800/adafruit_products_feather_esp32_v2_ss.png?1682710725)

If the installation was successful, a popover should appear displaying that your board has successfully been detected by Adafruit IO.

Give your board a name and click "Continue to Device Page".

![](https://cdn-learn.adafruit.com/assets/assets/000/112/921/medium800/adafruit_products_io_device_detected_v2.png?1657212598)

You should be brought to your board's device page.

![](https://cdn-learn.adafruit.com/assets/assets/000/112/922/medium800/adafruit_products_io_device_page_v2.png?1657212608)

## Feedback

Adafruit.io WipperSnapper is in **beta** and you can help improve it!

If you have&nbsp; suggestions or general feedback about the installation process - visit [https://io.adafruit.com/support](https://io.adafruit.com/support), click _"Contact Adafruit IO Support"_ and select _"I have feedback or suggestions for the WipperSnapper Beta"._

## Troubleshooting

If you encountered an issue during installation, please try the steps below first.

If you're still unable to resolve the issue, or if your issue is not listed below, get in touch with us directly at [https://io.adafruit.com/support](https://io.adafruit.com/support "https://io.adafruit.com/support"). Make sure to click&nbsp; _"Contact Adafruit IO Support"_ and select "_There is an issue with WipperSnapper. Something is broken!"_

### 

First, make sure that you selected the correct board on the board selector.

Next, please make sure that you entered your WiFi credentials properly, there are no spaces/special characters in either your network name (SSID) or password, and that you are connected to a 2.4GHz wireless network.

If you're still unable to connect your board to WiFi, please [make a new post on the WipperSnapper technical support forum with the error you're experiencing, the LED colors which are blinking, and the board you're using.](https://forums.adafruit.com/viewforum.php?f=66)

### 

Try hard-resetting your board by unplugging it from USB power and plugging it back in.

If the error is still occurring, please&nbsp;[make a new post on the WipperSnapper technical support forum with information about what you're experiencing, the LED colors which are blinking (if applicable), and the board you're using.](https://forums.adafruit.com/viewforum.php?f=66)

## "Uninstalling" WipperSnapper&nbsp;

WipperSnapper firmware is an application that is loaded onto your board. There is nothing to "uninstall". However, you may want to "move" your board from running WipperSnapper to running Arduino or CircuitPython. You also may need to restore your board to the state it was shipped to you from the Adafruit factory.&nbsp;

### Moving from WipperSnapper to CircuitPython

Follow the steps on the [Installing CircuitPython page](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython) to install CircuitPython on your board running WipperSnapper.

- If you are unable to double-tap the RST button to enter the UF2 bootloader, follow the _"Factory Resetting a WipperSnapper Board"_ instructions below.

Uploading this sketch will overwrite WipperSnapper. If you want to re-install WipperSnapper, follow the instructions at the top of this page.

### Moving from WipperSnapper to Arduino

If you want to use your board with Arduino, you will use the Arduino IDE to load&nbsp;_any_ sketch onto your board.

First, follow the page below to set up your Arduino IDE environment for use with your board.

[Setup Arduino IDE](https://learn.adafruit.com/adafruit-esp32-feather-v2/arduino-ide-setup)
Then, follow the page below to upload the "Arduino Blink" sketch to your board.

[Upload Arduino "Blink" Sketch](https://learn.adafruit.com/adafruit-esp32-feather-v2/blink)
Uploading this sketch will overwrite WipperSnapper. If you want to re-install WipperSnapper, follow the instructions at the top of this page.

### Factory Resetting a WipperSnapper Board

Sometimes, hardware gets into a state that requires it to be "restored" to the original state it shipped in. If you'd like to get your board back to its original factory state, follow the guide below.

[Factory Reset your Adafruit Feather HUZZAH ESP32-V2](https://learn.adafruit.com/adafruit-esp32-feather-v2/factory-reset)
# Adafruit ESP32 Feather V2

## WipperSnapper Essentials

![](https://cdn-learn.adafruit.com/assets/assets/000/117/601/medium800/wippersnapper_essentials_heading__required_parts__sensors_boardspread.jpg?1674497784)

You've installed WipperSnapper firmware on your board and connected it to Adafruit IO. Next, let's learn how to use Adafruit IO!

The Adafruit IO supports a large number of _components. Components_ are physical parts such as buttons, switches, sensors, servos, LEDs, RGB LEDs, and more.&nbsp;

The following pages will get you up and running with WipperSnapper as you interact with your board's LED, read the value of a push button, send the value of an I2C sensor to the internet, and wirelessly control colorful LEDs.

### Parts

The following parts are&nbsp; **required** to complete the WipperSnapper essentials pages for this board:

### STEMMA Wired Potentiometer Breakout Board - 10K ohm Linear

[STEMMA Wired Potentiometer Breakout Board - 10K ohm Linear](https://www.adafruit.com/product/4493)
For the easiest way possible to measure twists, turn to this STEMMA potentiometer breakout (ha!). This plug-n-play pot comes with a JST-PH 2mm connector and a matching &nbsp;[JST PH 3-Pin to Male Header Cables - 200mm](https://www.adafruit.com/product/3893), so wiring up is a cinch....

Out of Stock
[Buy Now](https://www.adafruit.com/product/4493)
[Related Guides to the Product](https://learn.adafruit.com/products/4493/guides)
![Video of a white hand turning the knob on a STEMMA Wired Potentiometer Breakout Board connect to a breadboard. Color changes when the knob is twisted. ](https://cdn-shop.adafruit.com/product-videos/640x480/4493-04.jpg)

# Adafruit ESP32 Feather V2

## LED Blink

Info: This demo shows controlling an LED from Adafruit IO. The same kind of control can be used for relays, lights, motors, or solenoids.

One of the first programs you typically write to get used to embedded programming is a sketch that repeatably blinks an LED. IoT projects are&nbsp;_wireless,_&nbsp;so after completing this section, you'll be able to turn on (or off) the LED built into your board from anywhere in the world.

## Where is the LED on my board?
The Adafruit Feather ESP32 V2's LED (highlighted in red) is located above the USB-C port.

![adafruit_products_led_red.png](https://cdn-learn.adafruit.com/assets/assets/000/117/632/medium640/adafruit_products_led_red.png?1674596552)

## Create a LED Component on Adafruit IO
On the device page, click the New Component (or "+") button to open the component picker.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/765/medium800/adafruit_products_esp32v2_new_component.png?1677186198)

Search for the component name by entering&nbsp;`LED`&nbsp;into the text box on the component picker, the list of components should update as soon as you stop typing.

![led_blink_LED_select.png](https://cdn-learn.adafruit.com/assets/assets/000/127/428/medium640/led_blink_LED_select.png?1706755656)

### Filtering and searching for components

Since WipperSnapper supports such a large number of components, there is keyword filtering. Try searching for various keywords, like:

- component names:&nbsp;`aht20`,&nbsp;`servo`,&nbsp;`buzzer`,&nbsp;`button`, `led`, etc
- sensor types:&nbsp;`light`,&nbsp;`temperature`,&nbsp;`pressure`,&nbsp;`humidity`, etc
- interface:&nbsp;`i2c`,&nbsp;`uart`,&nbsp;`ds18x20`,&nbsp;`pin`, etc (also I2C addresses e.g.&nbsp;`0x44`)
- vendor:&nbsp;`Adafruit`,&nbsp;`ASAIR`,&nbsp;`Infineon`,&nbsp;`Bosch`,&nbsp;`Honeywell`,&nbsp;`Sensirion`, etc

There are also product and documentation links to every component. Follow the links beneath the component descriptions to be taken to the appropriate product page or Learn Guide

Select the **LED** from the list of components.

![led_blink_LED_select.png](https://cdn-learn.adafruit.com/assets/assets/000/127/429/medium640/led_blink_LED_select.png?1706755753)

On the Create LED Component form, the board's LED pin is pre-selected.&nbsp;

Click Create Component.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/766/medium800/adafruit_products_esp32v2_led_form.png?1677186561)

Behind the scenes, Adafruit IO sends send a command to your board running WipperSnapper telling it to configure "LED Pin" as a digital output.

Your board's page on Adafruit IO shows a new LED component.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/768/medium800/adafruit_products_esp32v2_led_page.png?1677186487)

## Usage
On the board page, toggle the LED component by clicking the toggle switch. This should turn your board's built-in LED on or off.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/770/medium800thumb/adafruit_products_ezgif.com-video-to-gif_%2821%29.jpg?1677187065)

# Adafruit ESP32 Feather V2

## NeoPixel LED

Your board has a WS281x RGB LED (NeoPixel, in Adafruit jargon) built in. Boards running the WipperSnapper firmware can be wirelessly controlled by Adafruit IO to interact with NeoPixels.

On this page, you'll learn how to change the color and brightness of the NeoPixel built into your board from Adafruit IO.

## Where is the NeoPixel on my board?
On your Adafruit ESP32 Feather V2, the NeoPixel (highlighted in red) is located underneath the ESP32 module.

![adafruit_products_rgb_led.png](https://cdn-learn.adafruit.com/assets/assets/000/117/631/medium640/adafruit_products_rgb_led.png?1674596035)

## Create the NeoPixel Component

On the device page, click the New Component (or "+") button to open the component picker.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/776/medium800/adafruit_products_esp32v2_new_component.png?1677187371)

Search for the component name by entering&nbsp;`neopixel`&nbsp;into the text box on the component picker, the list of components should update as soon as you stop typing

![neopixel_led__external__neopixel_led__built_in__NaP8Tyf3AP.png](https://cdn-learn.adafruit.com/assets/assets/000/127/448/medium640/neopixel_led__external__neopixel_led__built_in__NaP8Tyf3AP.png?1706818437)

### 

WipperSnapper supports such a large number of components we added filtering!  
Try searching for various keywords, like:

- component names:&nbsp;`aht20`,&nbsp;`servo`,&nbsp;`buzzer`,&nbsp;`button`, `neopixel`, etc
- sensor types:&nbsp;`light`,&nbsp;`temperature`,&nbsp;`pressure`,&nbsp;`humidity`, etc
- interface:&nbsp;`i2c`,&nbsp;`uart`,&nbsp;`ds18x20`,&nbsp;`pin`, etc (also I2C addresses e.g.&nbsp;`0x44`)
- vendor:&nbsp;`Adafruit`,&nbsp;`ASAIR`,&nbsp;`Infineon`,&nbsp;`Bosch`,&nbsp;`Honeywell`,&nbsp;`Sensirion`, etc

We’ve also added product and documentation links to every component, follow the links beneath the component descriptions to be taken to the appropriate product page or Learn-Guide

Select the **NeoPixel** &nbsp;from the list of results to go to the component configuration page.

There will be a back button if you select the wrong component, and you can use the Edit component icon (⚙️) on the device page to update the component configuration in the future.

![neopixel_led__external__neopixel_led__built_in__NaP8Tyf3AP.png](https://cdn-learn.adafruit.com/assets/assets/000/127/451/medium640/neopixel_led__external__neopixel_led__built_in__NaP8Tyf3AP.png?1706819169)

The board's NeoPixel pin is automatically found and selected.

Click&nbsp; **Create Component**

![](https://cdn-learn.adafruit.com/assets/assets/000/117/667/medium800/adafruit_products_IO_-_Device__Adafruit_Feather_ESP32_V2.png?1674665335)

Behind the scenes, Adafruit IO sends a command to your board running WipperSnapper firmware telling it to configure the pin as a NeoPixel component with the settings from the form.

The Device page shows the NeoPixel component.

![](https://cdn-learn.adafruit.com/assets/assets/000/117/668/medium800/adafruit_products_IO_-_Device__Adafruit_Feather_ESP32_V2.png?1674665418)

## Set the NeoPixel's RGB Color

Since no colors have been set yet, the color picker's default value is `#000000` (black in hex color code) and appears "off". You can change that to make the NeoPixel shine brightly!&nbsp;

On the NeoPixel component, click the gray "No Color Set" button.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/424/medium800/neopixel_led__external__neopixel_led__built_in__click-no-color-set.png?1676050249)

A color picker pops open! Adafruit IO uses hex color codes to represent the colors on your NeoPixel.

### Hex Colors 101

The color picker on Adafruit IO uses hex color codes to represent Red, Green, and Blue values. For example, `#FF0000` is the hex color code for the color red. The colors (`#FF0000`) red component is `FF` (255 translated to decimal), the green component is `00` and the blue component is `00`. Translated to RGB format, the color is `RGB (255, 0, 0)`.&nbsp;

Using the color picker, or by manually entering a hex color code, select a color.

![](https://cdn-learn.adafruit.com/assets/assets/000/117/677/medium800thumb/neopixel_led_ezgif.com-gif-maker_%283%29.jpg?1674668859)

When you're ready to set the color of your device's NeoPixel, click **FILL WITH COLOR**.&nbsp;The NeoPixel will immediately glow!

![](https://cdn-learn.adafruit.com/assets/assets/000/118/781/medium800thumb/adafruit_products_ezgif.com-video-to-gif_%2822%29.jpg?1677114674)

## Set NeoPixel Brightness

If the NeoPixel is too bright (or too dim), you can change its brightness. Click the gear/cog icon on the NeoPixel component to open its settings.

![](https://cdn-learn.adafruit.com/assets/assets/000/117/674/medium800/neopixel_led_IO_-_Device__Adafruit_Feather_ESP32_V2.png?1674666612)

On the NeoPixel component form, set Brightness to a value between 0 (fully off) and 255 (full brightness).

Click the **Update Component&nbsp;** button to send the updated configuration to your device.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/117/675/medium800/neopixel_led_IO_-_Device__Adafruit_Feather_ESP32_V2.png?1674666662)

# Adafruit ESP32 Feather V2

## Read a Push-button

Info: This demo shows reading the state of a push-button from WipperSnapper. But the same kind of control can be used for reading switches, break beam sensors, and other digital sensors.

You can configure a board running WipperSnapper to read data from standard input buttons, switches, or digital sensors, and send the value to Adafruit IO.

From Adafruit IO, you will configure one of the pushbuttons on your board as a push button component. Then, when the button is pressed (or released), a value will be published to Adafruit IO.

## Button Location

This example uses the board's built-in push-button and internal pull-up resistor instead of wiring a push-button up.

A user-readable button on the Adafruit ESP32 Feather V2 is located next to the NeoPixel LED and labeled on the silk as SW38.

![adafruit_products_esp32v2-btn.png](https://cdn-learn.adafruit.com/assets/assets/000/118/782/medium640/adafruit_products_esp32v2-btn.png?1677187961)

## Create a Push-button Component on Adafruit IO
On the device page, click the New Component (or "+") button to open the component picker.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/785/medium800/adafruit_products_esp32v2_new_component.png?1677188047)

Search for the component name by entering&nbsp;`push`&nbsp;into the text box on the component picker, the list of components should update as soon as you stop typing.

![read_a_push_button__built_in__5NrzQhD0zT.png](https://cdn-learn.adafruit.com/assets/assets/000/127/430/medium640/read_a_push_button__built_in__5NrzQhD0zT.png?1706749773)

### Filtering and searching for components

Since WipperSnapper supports such a large number of components, you can use filtering. Try searching for various keywords, like:

- component names:` aht20`,&nbsp;`servo`,&nbsp;`buzzer`,&nbsp;`button`,&nbsp;`potentiometer`, etc
- sensor types:&nbsp;`light`,&nbsp;`temperature`,&nbsp;`pressure`,&nbsp;`humidity`, etc
- interface:&nbsp;`i2c`,&nbsp;`uart`,&nbsp;`ds18x20`,&nbsp;`pin`, etc (also I2C addresses e.g.&nbsp;`0x44`)
- vendor:&nbsp;`Adafruit`,&nbsp;`ASAIR`,&nbsp;`Infineon`,&nbsp;`Bosch`,&nbsp;`Honeywell`,&nbsp;`Sensirion`, etc

There are also added product and documentation links for every component. Follow the links beneath the component descriptions to be taken to the appropriate product page or Learn Guide.

Select the **Push Button** &nbsp;from the list of results to go to the component configuration page.

There will be a back button if you select the wrong component, and you can use the Edit component icon (⚙️) on the device page to update the component configuration in the future.

![read_a_push_button__built_in__5NrzQhD0zT.png](https://cdn-learn.adafruit.com/assets/assets/000/127/431/medium640/read_a_push_button__built_in__5NrzQhD0zT.png?1706749847)

The "Create Push Button Component" form&nbsp;presents you with options for configuring the push button.

Start by selecting the board's pin connected to the push button.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/787/medium800/adafruit_products_esp32v2-btn-pin.png?1677188080)

The&nbsp;_Return Interval_&nbsp;dictates how frequently the value of the push-button will be sent from the board to Adafruit IO.

For this example, you will configure the push button's value to be only sent when the value changes (i.e. when it's either pressed or depressed).

![](https://cdn-learn.adafruit.com/assets/assets/000/118/799/medium800/adafruit_products_esp32v2-btn-interval.png?1677115125)

Finally, check the&nbsp; **Specify Pin Pull Direction&nbsp;** checkbox and select the pull direction.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/801/medium800/adafruit_products_esp32v2-btn-pull.png?1677115034)

Make sure the form's settings look like the following screenshot. Then, click&nbsp; **Create Component**.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/802/medium800/adafruit_products_esp32v2-btn-final.png?1677115078)

Adafruit IO sends a command to your WipperSnapper board, telling it to configure the GPIO pin you selected to behave as a digital input pin and to enable it to pull up the internal resistor.

Your board's page should also show the new push-button component.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/803/medium800/adafruit_products_esp32v2-btn-page.png?1677115139)

Push the button on your board to change the value of the push-button component on Adafruit IO.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/808/medium800thumb/adafruit_products_ezgif.com-video-to-gif_%2823%29.jpg?1677115979)

# Adafruit ESP32 Feather V2

## Analog Input

Your microcontroller board has both digital and analog signal capabilities. Some pins are analog, some are digital, and some are capable of both. Check the **Pinouts** page in this guide for details about your board.

Analog signals are different from digital signals in that they can be _any_ voltage and can vary continuously and smoothly between voltages. An analog signal is like a dimmer switch on a light, whereas a digital signal is like a simple on/off switch.&nbsp;

Digital signals only can ever have two states, they are either are **on** (high logic level voltage like 3.3V) or **off** (low logic level voltage like 0V / ground).

By contrast, analog signals can be any voltage in-between on and off, such as 1.8V or 0.001V or 2.98V and so on.

![](https://cdn-learn.adafruit.com/assets/assets/000/102/411/medium800/analog_in_Analog_Template_analog.jpg?1622144011)

Analog signals are continuous values which means they can be an _infinite_ number of different voltages. Think of analog signals like a floating point or fractional number, they can smoothly transiting to _any_ in-between value like 1.8V, 1.81V, 1.801V, 1.8001V, 1.80001V and so forth to infinity.

Many devices use analog signals, in particular sensors typically output an analog signal or voltage that varies based on something being sensed like light, heat, humidity, etc.

## Analog to Digital Converter (ADC)

An analog-to-digital-converter, or ADC, is the key to reading analog signals and voltages with a microcontroller. An ADC is a device that reads the voltage of an analog signal and converts it into a digital, or numeric, value. The microcontroller can’t read analog signals directly, so the analog signal is first converted into a numeric value by the ADC.&nbsp;

The black line below shows a digital signal over time, and the red line shows the converted analog signal over the same amount of time.

![](https://cdn-learn.adafruit.com/assets/assets/000/102/412/medium800/analog_in_Analog_Template_ADC.jpg?1622144080)

Once that analog signal has been converted by the ADC, the microcontroller can use those digital values any way you like!

## Potentiometers

A potentiometer is a small variable resistor that you can twist a knob or shaft to change its resistance. It has three pins. By twisting the knob on the potentiometer you can change the resistance of the middle pin (called the wiper) to be anywhere within the range of resistance of the potentiometer.

By wiring the potentiometer to your board in a special way (called a voltage divider) you can turn the change in resistance into a change in voltage that your board’s analog to digital converter can read.

![](https://cdn-learn.adafruit.com/assets/assets/000/102/413/medium800/analog_in_Analog_Template_potentiometer.jpg?1622144123)

To wire up a potentiometer as a voltage divider:

- Connect **one outside pin** to **ground**
- Connect **the other outside pin** to **voltage in (e.g. 3.3V)**
- Connect **the middle pin** to **an analog pin (e.g. A0)**

![analog_in_Analog_template_pot_voltage_divider.jpg](https://cdn-learn.adafruit.com/assets/assets/000/102/481/medium640/analog_in_Analog_template_pot_voltage_divider.jpg?1622481955)

## Hardware

In addition to your microcontroller board, you will need the following hardware to follow along with this example.

 **Potentiometer**

### STEMMA Wired Potentiometer Breakout Board - 10K ohm Linear

[STEMMA Wired Potentiometer Breakout Board - 10K ohm Linear](https://www.adafruit.com/product/4493)
For the easiest way possible to measure twists, turn to this STEMMA potentiometer breakout (ha!). This plug-n-play pot comes with a JST-PH 2mm connector and a matching &nbsp;[JST PH 3-Pin to Male Header Cables - 200mm](https://www.adafruit.com/product/3893), so wiring up is a cinch....

Out of Stock
[Buy Now](https://www.adafruit.com/product/4493)
[Related Guides to the Product](https://learn.adafruit.com/products/4493/guides)
![Video of a white hand turning the knob on a STEMMA Wired Potentiometer Breakout Board connect to a breadboard. Color changes when the knob is twisted. ](https://cdn-shop.adafruit.com/product-videos/640x480/4493-04.jpg)

## Wire Up the Potentiometer

Connect the potentiometer to your board as follows.

Make the following connections between the Feather and your potentiometer:&nbsp;

- **Feather 3.3V&nbsp;** to **&nbsp;potentiometer left pin**
- **Feather A2&nbsp;** to **&nbsp;potentiometer middle pin**
- **Feather GND&nbsp;** to **&nbsp;potentiometer right pin**

**Note:** &nbsp;On WipperSnapper, the ESP32's ADC1 pins are unusable for analog input since WiFi is constantly running.&nbsp;

- [For information on what Analog Input pins can (and can't) be used on this board, click here \>\>\>](https://learn.adafruit.com/adafruit-huzzah32-esp32-feather/esp32-faq#faq-2991123)

![adafruit_products_esp32v2-pot-frzz_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/118/814/medium640/adafruit_products_esp32v2-pot-frzz_bb.png?1677116203)

## Create a Potentiometer Component on Adafruit IO

On the device page, click the New Component (or "+") button to open the component picker.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/815/medium800/adafruit_products_esp32v2_new_component.png?1677116150)

Search for the component name by entering `potentiometer`&nbsp;into the text box on the component picker, the list of components should update as soon as you stop typing.

![analog_in__pot___N0AyUqauwx.png](https://cdn-learn.adafruit.com/assets/assets/000/128/616/medium640/analog_in__pot___N0AyUqauwx.png?1709746646)

### Filtering and searching for components

Since WipperSnapper supports such a large number of components, there is keyword filtering. Try searching for various keywords, like:

- component names: `aht20`,&nbsp;`servo`,&nbsp;`buzzer`,&nbsp;`button`,&nbsp;`potentiometer`, etc
- sensor types:&nbsp;`light`,&nbsp;`temperature`,&nbsp;`pressure`,&nbsp;`humidity`, etc
- interface:&nbsp;`i2c`,&nbsp;`uart`,&nbsp;`ds18x20`,&nbsp;`pin`, etc (also I2C addresses e.g.&nbsp;`0x44`)
- vendor:&nbsp;`Adafruit`,&nbsp;`ASAIR`,&nbsp;`Infineon`,&nbsp;`Bosch`,&nbsp;`Honeywell`,&nbsp;`Sensirion`, etc

There are also added product and documentation links for every component, follow the links beneath the component descriptions to be taken to the appropriate product page or Learn Guide.

Select the&nbsp; **Potentiometer** &nbsp;from the list of results to go to the component configuration page.

There will be a back button if you select the wrong component, and you can use the Edit component icon (⚙️) on the device page to update the component configuration in the future.

![analog_in__pot___N0AyUqauwx.png](https://cdn-learn.adafruit.com/assets/assets/000/128/617/medium640/analog_in__pot___N0AyUqauwx.png?1709746737)

On the _Create Potentiometer Component_ form:

- Set&nbsp; **Potentiometer Pin** &nbsp;to&nbsp; **A2**

- Select **"On Change"** as the **Return Interval**
- Select **Raw Analog Value** as the **Return Type**

Then, click Create Component

![](https://cdn-learn.adafruit.com/assets/assets/000/128/712/medium800/adafruit_products_wireless_analog_in__pot___pot-pin-form.png?1710503363)

The potentiometer component appears on your board page! Next, learning to read values from it.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/817/medium800/adafruit_products_esp32v2-pot-pg.png?1677116352)

## Read Analog Pin Values

Rotate the potentiometer to see the value change.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/240/medium800thumb/analog_in__pot___ezgif.com-video-to-gif.jpg?1675792293)

_What do these values mean?_

WipperSnapper reports ADC "raw values" as 16-bit unsigned integer values. Your potentiometer will read between 0 (twisting the pot to the leftmost position) and 65535 (twisting the pot to the rightmost position).&nbsp;

## Read Analog Pin Voltage Values

You can update the potentiometer component (or any analog pin component in WipperSnapper) to report values in Volts. To do this, on the right-hand side of the potentiometer component, click the cog button.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/241/medium800/analog_in__pot___cog-click.png?1675792568)

Under **Return Type** , click Voltage.

Click Update Component to send the updated component settings to your board running WipperSnapper.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/242/medium800/analog_in__pot___voltage-select.png?1675792603)

Now, twist the potentiometer to see the value reported to Adafruit IO in Volts!

![](https://cdn-learn.adafruit.com/assets/assets/000/118/243/medium800thumb/analog_in__pot___ezgif.com-video-to-gif_%281%29.jpg?1675792716)

# Adafruit ESP32 Feather V2

## I2C Sensors

Info: 

Inter-Integrated Circuit, aka **I2C** , is a two-wire protocol for connecting sensors and "devices" to a microcontroller. A large number of sensors, including the ones sold by Adafruit, use I2C to communicate.&nbsp;

**Typically, using I2C with a microcontroller involves programming. Adafruit IO and WipperSnapper let you configure a microcontroller to read data from an I2C sensor and publish that data to the internet without writing code.**

The WipperSnapper firmware supports a number of I2C sensors,&nbsp;[viewable in list format here](https://github.com/adafruit/Wippersnapper_Components/tree/main/components/i2c).

- If you do not see the I2C sensor you're attempting to use with WipperSnapper,&nbsp;[Adafruit has a guide on adding a component to Adafruit IO WipperSnapper here](https://learn.adafruit.com/how-to-add-a-new-component-to-adafruit-io-wippersnapper).&nbsp;

On this page, you'll learn how to wire up an I2C sensor to your board. Then, you'll create a new component on Adafruit IO for your I2C sensor and send the sensor values to Adafruit IO. Finally, you'll learn how to locate, interpret, and download the data produced by your sensors.

## Parts

You will need the following parts to complete this page:

### Adafruit MCP9808 High Accuracy I2C Temperature Sensor Breakout

[Adafruit MCP9808 High Accuracy I2C Temperature Sensor Breakout](https://www.adafruit.com/product/5027)
The MCP9808 digital temperature sensor is one of the more accurate/precise we've ever seen, with a typical accuracy of ±0.25°C over the sensor's -40°C to +125°C range and precision of +0.0625°C. They work great with any microcontroller using standard I2C. With...

Out of Stock
[Buy Now](https://www.adafruit.com/product/5027)
[Related Guides to the Product](https://learn.adafruit.com/products/5027/guides)
![Top view of temperature sensor breakout above an OLED display FeatherWing. The OLED display reads "MCP9808 Temp: 24.19ºC"](https://cdn-shop.adafruit.com/640x480/5027-04.jpg)

## Wiring
 **Board STEMMA QT Port** &nbsp;to&nbsp; **MCP9808 STEMMA QT Port**

![adafruit_products_esp32v2-mcp9808_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/118/819/medium640/adafruit_products_esp32v2-mcp9808_bb.png?1677116635)

## Add an MCP9808 Component

On the device page, click the New Component (or "+") button to open the component picker.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/824/medium800/adafruit_products_esp32v2_new_component.png?1677117321)

Search for the component name by entering `MCP9808`&nbsp;into the text box on the component picker, the list of components should update as soon as you stop typing.

![i2c__external__ARROW_YHKeButdWT.png](https://cdn-learn.adafruit.com/assets/assets/000/127/456/medium640/i2c__external__ARROW_YHKeButdWT.png?1706830517)

### Filtering and searching for components

Since WipperSnapper supports such a large number of components, there is keyword filtering. Try searching for various keywords, like:

- component names:&nbsp;`aht20`,&nbsp;`servo`,&nbsp;`buzzer`,&nbsp;`button`,&nbsp;`potentiometer`, etc
- sensor types:&nbsp;`light`,&nbsp;`temperature`,&nbsp;`pressure`,&nbsp;`humidity`, etc
- interface:&nbsp;`i2c`,&nbsp;`uart`,&nbsp;`ds18x20`,&nbsp;`pin`, etc (also I2C addresses e.g.&nbsp;`0x44`)
- vendor:&nbsp;`Adafruit`,&nbsp;`ASAIR`,&nbsp;`Infineon`,&nbsp;`Bosch`,&nbsp;`Honeywell`,&nbsp;`Sensirion`, etc

There are added product and documentation links for every component, follow the links beneath the component descriptions to be taken to the appropriate product page or Learn Guide.

Select the&nbsp; **MCP9808** &nbsp;from the list of results to go to the component configuration page.

There will be a back button if you select the wrong component, and you can use the Edit component icon (⚙️) on the device page to update the component configuration in the future.

![i2c__external__ARROW_YHKeButdWT.png](https://cdn-learn.adafruit.com/assets/assets/000/127/457/medium640/i2c__external__ARROW_YHKeButdWT.png?1706830625)

On the component configuration page, the MCP9808's I2C sensor address should be listed along with the sensor's settings.

![](https://cdn-learn.adafruit.com/assets/assets/000/117/981/medium800/i2c__external__mcp9808-form.png?1675199307)

The MCP9808 sensor can measure ambient temperature. This page has individual options for reading the ambient temperature, in either Celsius or Fahrenheit. You may select the readings which are appropriate to your application and region.

The&nbsp; **Send Every** &nbsp;option is specific to each sensor measurement. This option will tell the board how often it should read from the sensor and send the data to Adafruit IO. Measurements can range from every 30 seconds to every 24 hours.

For this example, set the&nbsp; **Send Every&nbsp;** interval for both seconds to&nbsp; **Every 30 seconds.&nbsp;** Click&nbsp; **Create Component**.

![](https://cdn-learn.adafruit.com/assets/assets/000/117/982/medium800/i2c__external__mcp9808-form-2.png?1675199314)

The board page should now show the MCP9808 component you created. After the interval you configured elapses, the WipperSnapper firmware running on your board automatically reads values from the sensor and sends them to Adafruit IO.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/828/medium800/adafruit_products_esp32v2-mcp.png?1677117759)

## Read I2C Sensor Values

Now to look behind the scenes at a powerful element of using Adafruit IO and WipperSnapper. When a new component is created on Adafruit IO, an&nbsp;[Adafruit IO Feed](https://learn.adafruit.com/adafruit-io-basics-feeds)&nbsp;is also created. This Feed holds your sensor component values for long-term storage (30 days of storage for Adafruit IO Free and 60 days for Adafruit IO Plus plans).

Aside from holding the&nbsp; **values** &nbsp;read by a sensor, the component's feed also holds&nbsp; **metadata** &nbsp;about the data pushed to Adafruit IO. This includes settings for whether the data is public or private, what license the stored sensor data falls under, and a general description of the data.

Next, to look at the sensor temperature feed. To navigate to a component's feed, click on the chart icon in the upper-right-hand corner of the component.

![](https://cdn-learn.adafruit.com/assets/assets/000/117/984/medium800/i2c__external__chart-icon.png?1675199374)

On the component's feed page, you'll each data point read by your sensor and when they were reported to Adafruit IO.

![](https://cdn-learn.adafruit.com/assets/assets/000/117/985/medium800/i2c__external__mcpx-feed.png?1675199406)

### Doing more with your sensor's Adafruit IO Feed

This only scratches the surface of what Adafruit IO Feeds can accomplish for your IoT projects. For a complete overview of Adafruit IO Feeds, including tasks like downloading feed data, sharing a feed, removing erroneous data points from a feed, and more,&nbsp;[head over to the "Adafruit IO Basics: Feed" learning guide](https://learn.adafruit.com/adafruit-io-basics-feeds).

# Adafruit ESP32 Feather V2

## MicroPython Setup

This board is also supported by MicroPython. This page covers the basics to get you started.

Warning: 

## Load MicroPython using `esptool`

Before you can load MicroPython, you'll need to install `esptool`. Follow the instructions found [here](https://docs.espressif.com/projects/esptool/en/latest/esp32/index.html#quick-start).

Once you have `esptool` installed, you will first want to erase the flash on your Feather. You can do so by running something similar to the following command. Make sure you update the port to match the serial port to which your board is connected, i.e. change `/dev/tty.usbserial-1144440` to match your connection.

`esptool.py --chip esp32 --baud 115200 --port /dev/tty.usbserial-1144440 erase_flash`

![](https://cdn-learn.adafruit.com/assets/assets/000/110/211/medium800/adafruit_products_FV2_erase_flash.png?1648236728)

Once the flash is successfully erased, you can load MicroPython by running something similar to the command below. Make sure you update the following:

- The port to match the serial port to which your board is connected, i.e. change **/dev/tty.usbserial-1144440** to match your connection.
- The **firmware.bin** file name to match the MicroPython firmware you downloaded, i.e. change **firmware.bin** to something like **esp32spiram-20220117-v1.18.bin**.

Load MicroPython using something similar to the following command, with the above changes:

`esptool.py --chip esp32  --baud 115200 --port /dev/tty.usbserial-1144440 write_flash -z 0x1000 firmware.bin`

![](https://cdn-learn.adafruit.com/assets/assets/000/110/212/medium800/adafruit_products_Fv2_load_MicroPython.png?1648236968)

## MicroPython Blink

The first example is making an LED blink. To do so, begin by connecting to the serial REPL.

![](https://cdn-learn.adafruit.com/assets/assets/000/110/213/medium800/adafruit_products_Screen_Shot_2022-03-25_at_15.44.50.png?1648237500)

Type the following code into the REPL.

Info: 

```python
import time
from machine import Pin
led = Pin(13, Pin.OUT)
while True:
    led.on()
    time.sleep(0.5)
    led.off()
    time.sleep(0.5)
```

First you `import time`, and `from machine import Pin`. Next, you create the led object. The LED is on pin `13`, and the pin must be set as an output when used for this purpose. Inside the loop, you turn the led pin on, wait 0.5 seconds, turn the LED pin off, wait another 0.5 seconds, and repeat.

![](https://cdn-learn.adafruit.com/assets/assets/000/110/214/medium800/adafruit_products_FV2_MicroPython_blink.png?1648240219)

This code will continue running until you break out of it by typing CTRL+C. When you type CTRL+C with the above code running, you'll see something like the following as you return to the REPL prompt.

![](https://cdn-learn.adafruit.com/assets/assets/000/110/215/medium800/adafruit_products_FV2_MicroPython_blink_ctrl_C.png?1648240341)

That's all there is to blinking the build-in red LED on the ESP32 Feather V2 using MicroPython and the REPL.

## MicroPython WiFi Connection

To manage and run code, you can use Thonny - set up to be a **MicroPython (ESP32)** board, then pick the matching serial port.

![](https://cdn-learn.adafruit.com/assets/assets/000/110/216/medium800/adafruit_products_FV2_Thonny_MicroPython_ESP32.png?1648240764)

Install the `urequests` library via the package manager. Click&nbsp; **Tools \> Manage Packages&nbsp;** to open the package manager. Type **urequests** into the search bar, and click **Search on PyPI**.

![](https://cdn-learn.adafruit.com/assets/assets/000/110/390/medium800/adafruit_products_FV2_MP_urequests_search.png?1648663762)

You may be greeted with the following popup. Click **Yes**.

![](https://cdn-learn.adafruit.com/assets/assets/000/110/391/medium800/adafruit_products_FV2_MP_urequests_install_popup.png?1648663810)

Once installed, the package manager will show it as installed.

![](https://cdn-learn.adafruit.com/assets/assets/000/110/392/medium800/adafruit_products_FV2_MP_urequests_installed.png?1648663868)

Download the following code and save it to your ESP32 as **main.py**

Don't forget to change `MY_SSID` and `MY_PASSWORD` to your WiFi access point name and credentials.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/MicroPython_WiFi/main.py

Once you have the **main.py** file on your computer, open the **main.py** file into Thonny, and click **Save**.

![](https://cdn-learn.adafruit.com/assets/assets/000/110/393/medium800/adafruit_products_FV2_MP_save_Thonny.png?1648664635)

The first time you do this, you will receive the following popup. Click **MicroPython**  **Device**.

![](https://cdn-learn.adafruit.com/assets/assets/000/110/394/medium800/adafruit_products_FV2_MP_where_to_save_MP_device.png?1648664711)

The following window will show up next, allowing you to save the **main.py** file to your Feather ESP32 V2.

![](https://cdn-learn.adafruit.com/assets/assets/000/110/395/medium800/adafruit_products_FV2_MP_save_main_py.png?1648664753)

Once saved to your ESP32, in Thonny, click **STOP (red button)** followed by **Run (green arrow button)** to load the **main.py** file and run it.

![](https://cdn-learn.adafruit.com/assets/assets/000/110/396/medium800/adafruit_products_FV2_MP_click_run.png?1648665091)

You should see something like the following indicating it could connect to WiFI and read the data from our webserver.

![](https://cdn-learn.adafruit.com/assets/assets/000/110/397/medium800/adafruit_products_FV2_MP_WiFi_demo_success.png?1648665171)

# Adafruit ESP32 Feather V2

## Factory Reset

Your microcontroller ships running a factory demo. It's lovely, but you probably had other plans for the board. As you start working with your board, you may want to return to the original code to begin again, or you may find your board gets into a bad state. Either way, this page has you covered.

## Factory Reset Example Code
If you're still able to load Arduino sketches, you can load the following sketch onto your board to return it to its original state.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Factory_Tests/Feather_ESP32_V2_FactoryTest/Feather_ESP32_V2_FactoryTest.ino

Your board is now back to its factory-shipped state! You can now begin again with your plans for your board.

## Factory Reset .bin
If your board is in a state where Arduino isn't working, you may need to use these tools to flash a .bin file directly onto your board.

There are two ways to do a factory reset. The first is using WebSerial through a Chromium-based browser, and the second is using `esptool` via command line. **We highly recommend using WebSerial through Chrome/Chromium.**

First you'll need to download the factory-reset.bin file. Save the following file wherever is convenient for you. You'll need access to it for both tools.

[Click to download feather-esp32-v2-factory-reset.bin](https://github.com/adafruit/Adafruit-ESP32-Feather-V2-PCB/raw/main/factory-reset/feather-esp32-v2-factory-reset.bin)
Now that you've downloaded the .bin file, you're ready to continue with the factory reset process. The next two sections walk you through using WebSerial and `esptool`.

## The WebSerial ESPTool Method
Primary: 

This method uses the WebSerial ESPTool through Chrome or a Chromium-based browser. The WebSerial ESPTool was designed to be a web-capable option for programming ESP32 boards. It allows you to erase the contents of the microcontroller and program up to four files at different offsets.

You will have to use a Chromium browser (like Chrome, Opera, Edge...) for this to work, Safari and Firefox, etc. are _not_ supported because we need Web Serial and only Chromium is supporting it to the level needed.

Follow the steps to complete the factory reset.

Warning: 

### Connect

You should have plugged in **only the ESP32 that you intend to flash**. That way there's no confusion in picking the proper port when it's time!

In the **Chrome browser** visit [https://adafruit.github.io/Adafruit\_WebSerial\_ESPTool/](https://adafruit.github.io/Adafruit_WebSerial_ESPTool/). You should see something like the image shown.

![esp32_factory_reset_Screen_Shot_2022-04-04_at_3.07.03_PM.png](https://cdn-learn.adafruit.com/assets/assets/000/110/492/medium640/esp32_factory_reset_Screen_Shot_2022-04-04_at_3.07.03_PM.png?1649110083)

Press the&nbsp; **Connect** &nbsp;button in the top right of the web browser. You will get a pop up asking you to select the COM or Serial port.

**Remember, you should remove all other USB devices so**  **_only_ the ESP32 board is attached, that way there's no confusion over multiple ports!**

On some systems, such as MacOS, there may be additional system ports that appear in the list.

![esp32_factory_reset_Screen_Shot_2022-04-04_at_3.12.49_PM.png](https://cdn-learn.adafruit.com/assets/assets/000/110/493/medium640/esp32_factory_reset_Screen_Shot_2022-04-04_at_3.12.49_PM.png?1649110453)

The Javascript code will now try to connect to the ROM bootloader. It may timeout for a bit until it succeeds. On success, you will see that it is&nbsp; **Connected** &nbsp;and will print out a unique&nbsp; **MAC address** identifying the board along with other information that was detected.

![esp32_factory_reset_Screen_Shot_2022-04-04_at_3.16.00_PM.png](https://cdn-learn.adafruit.com/assets/assets/000/110/494/medium640/esp32_factory_reset_Screen_Shot_2022-04-04_at_3.16.00_PM.png?1649110590)

&nbsp;

&nbsp;

Once you have successfully connected, the command toolbar will appear.

![esp32_factory_reset_Screen_Shot_2022-04-04_at_3.18.26_PM.png](https://cdn-learn.adafruit.com/assets/assets/000/110/496/medium640/esp32_factory_reset_Screen_Shot_2022-04-04_at_3.18.26_PM.png?1649110775)

### Erase the Contents
To erase the contents, click the Erase button. You will be prompted whether you want to continue. Click OK to continue or if you changed your mind, just click cancel.

![esp32_factory_reset_Screen_Shot_2022-04-04_at_3.19.58_PM.png](https://cdn-learn.adafruit.com/assets/assets/000/110/497/medium640/esp32_factory_reset_Screen_Shot_2022-04-04_at_3.19.58_PM.png?1649110871)

&nbsp;

You'll see "Erasing flash memory. Please wait..." This will eventually be followed by "Finished." and the amount of time it took to erase.

**Do not disconnect!** Immediately continue on to programming the ESP32.

![factory_reset___esp32_s2_WebSerial_ESPTool_erase_board_text.png](https://cdn-learn.adafruit.com/assets/assets/000/106/947/medium640/factory_reset___esp32_s2_WebSerial_ESPTool_erase_board_text.png?1638491869)

Danger: 

### Program the ESP32
Programming the microcontroller can be done with up to four files at different locations, but with the board-specific **factory-reset.bin** file, which you should have downloaded earlier, you only need to use one file.

Click on the first **Choose a file...**. (The tool will only attempt to program buttons with a file and a unique location.) Then, select the \*- **factory-reset.bin** file you downloaded in Step 1 that matches your board.

Verify that the&nbsp; **Offset** &nbsp;box next to the file location you used is (0x) **0**.

![install_uf2_bootloader_adafruit_products_image_(3).png](https://cdn-learn.adafruit.com/assets/assets/000/101/574/medium640/install_uf2_bootloader_adafruit_products_image_%283%29.png?1618608677)

Once you choose a file, the button text will change to match your filename. You can then select the **Program** button to begin flashing.

![esp32_factory_reset_Screen_Shot_2022-04-04_at_3.22.13_PM.png](https://cdn-learn.adafruit.com/assets/assets/000/110/500/medium640/esp32_factory_reset_Screen_Shot_2022-04-04_at_3.22.13_PM.png?1649111131)

A progress bar will appear and after a minute or two, you will have written the firmware.

![esp32_factory_reset_Screen_Shot_2022-04-04_at_3.23.42_PM.png](https://cdn-learn.adafruit.com/assets/assets/000/110/499/medium640/esp32_factory_reset_Screen_Shot_2022-04-04_at_3.23.42_PM.png?1649111082)

Once completed, you can skip down to the section titled Reset the Board.

## The `esptool` Method (for advanced users)
Danger: 

Alternatively, you can [use Espressif's esptool program](https://github.com/espressif/esptool)&nbsp;to communicate with the chip!&nbsp;`esptool`&nbsp;is the 'official' programming tool and is the most common/complete way to program an ESP chip.

### Install ESPTool.py

You will need to use the command line / Terminal to install and run&nbsp;`esptool`.

You will also need to have pip and Python installed (any version!).

Install the latest version using pip (you may be able to run&nbsp;`pip`&nbsp;without the&nbsp;`3`&nbsp;depending on your setup):

`pip3 install --upgrade esptool`

Then, you can run:

`esptool.py`

### Test the Installation

Run&nbsp;`esptool.py`&nbsp;in a new terminal/command line and verify you get something like the below:

![](https://cdn-learn.adafruit.com/assets/assets/000/109/599/medium800/esp32_factory_reset_ESP_factory_reset_esptool_verify.png?1646862954)

### Connect

Run the following command, replacing the `COM88` identifier after&nbsp;`--port`&nbsp;with the&nbsp;`COMxx`,&nbsp;`/dev/cu.usbmodemxx`&nbsp;or&nbsp;`/dev/ttySxx`&nbsp;you found above.

`esptool.py --port COM88 chip_id`

You should get a notice that it connected over that port and found an ESP32.

![](https://cdn-learn.adafruit.com/assets/assets/000/109/600/medium800/esp32_factory_reset_ESP_factory_reset_esptool_connect.png?1646862962)

### Installing the Factory Test file

Run this command and replace the serial port name, `COM88`, with your matching port and `*-factory-reset.bin` with file you just downloaded

`esptool.py --port COM88 write_flash 0x0 *-factory-reset.bin`

Don't forget to change the `--port` name to match.

There might be a bit of a 'wait' when programming, where it doesn't seem like it's working. Give it a minute, it has to erase the old flash code which can cause it to seem like it's not running.

You'll finally get an output like this:

![](https://cdn-learn.adafruit.com/assets/assets/000/109/601/medium800/esp32_factory_reset_ESP_factory_reset_esptool_install.png?1646862974)

Once completed, you can continue to the next section.

## Reset the board
Now that you've reprogrammed the board, you need to reset it to continue. Click the reset button to launch the new firmware.

Info: 

The NeoPixel LED on the Feather ESP32 V2 will light up blue, followed by a repeating rainbow swirl.

You've successfully returned your board to a factory reset state!

## Older Versions of Chrome
Primary: 

We suggest updating to Chrome 89 or newer, as Web Serial is enabled by default.

If you must continue using an older version of Chrome, follow these steps to enable Web Serial.

If you receive an error like the one shown when you visit the WebSerial ESPTool site, you're likely running an older version of Chrome.

**You must be using Chrome 78 or later to use Web Serial.**

![factory_reset___esp32_s2_WebSerial_ESPTool_Not_Supported_Error.png](https://cdn-learn.adafruit.com/assets/assets/000/106/929/medium640/factory_reset___esp32_s2_WebSerial_ESPTool_Not_Supported_Error.png?1638484333)

To enable Web Serial in Chrome versions 78 through 88:

- Visit **chrome://flags** &nbsp;from within Chrome.
- Find and enable the&nbsp; **Experimental Web Platform features**
- **Restart Chrome**

![install_uf2_bootloader_adafruit_products_Enable_Features.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/562/medium640/install_uf2_bootloader_adafruit_products_Enable_Features.jpg?1618608210)

# Adafruit ESP32 Feather V2

## Downloads

## Files

- [ESP32 datasheet](https://cdn-learn.adafruit.com/assets/assets/000/109/588/original/esp32-pico-mini-02_datasheet_en.pdf?1646852017)
- [CP2102N datasheet](https://cdn-learn.adafruit.com/assets/assets/000/109/587/original/cp2102n-datasheet.pdf?1646851900)
- [CH9102 datasheet](https://cdn-learn.adafruit.com/assets/assets/000/111/949/original/CH9102DS1.PDF?1653415979)
- [EagleCAD PCB files on GitHub](https://github.com/adafruit/Adafruit-ESP32-Feather-V2-PCB)
- [3D Models on GitHub](https://github.com/adafruit/Adafruit_CAD_Parts/tree/main/5400%20ESP32%20Feather%20V2)
- [Fritzing object in the Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20ESP32%20Feather%20V2.fzpz)
- [PrettyPins pinout PDF](https://github.com/adafruit/Adafruit-ESP32-Feather-V2-PCB/blob/main/Adafruit%20ESP32%20Feather%20V2%20Pinout.pdf)[on GitHub](https://github.com/adafruit/Adafruit-ESP32-Feather-V2-PCB/blob/main/Adafruit%20ESP32%20Feather%20V2%20Pinout.pdf)
- [PrettyPins pinout SVG](https://cdn-learn.adafruit.com/assets/assets/000/123/407/original/Adafruit_ESP32_Feather_V2_Pinout.svg?1691707267)

# 3D Model
![](https://cdn-learn.adafruit.com/assets/assets/000/111/868/medium800thumb/adafruit_products_5400_ESP32_Feather_V2.jpg?1653047984)

# Schematic and Fab Print
![](https://cdn-learn.adafruit.com/assets/assets/000/109/518/medium800/adafruit_products_FV2_sch.png?1646779441)

![](https://cdn-learn.adafruit.com/assets/assets/000/109/519/medium800/adafruit_products_FV2_fab_print.png?1646779449)


## Primary Products

### Adafruit ESP32 Feather V2 -  8MB Flash + 2 MB PSRAM

[Adafruit ESP32 Feather V2 -  8MB Flash + 2 MB PSRAM](https://www.adafruit.com/product/5400)
One of our star Feathers is the [Adafruit HUZZAH32 ESP32 Feather](https://www.adafruit.com/product/3405) - with the fabulous ESP32 WROOM module on there, it makes quick work of WiFi and Bluetooth® projects that take advantage of Espressifs most popular chipset. Recently we had...

In Stock
[Buy Now](https://www.adafruit.com/product/5400)
[Related Guides to the Product](https://learn.adafruit.com/products/5400/guides)
### Adafruit ESP32 Feather V2 w.FL Antenna -  8MB Flash + 2 MB PSRAM

[Adafruit ESP32 Feather V2 w.FL Antenna -  8MB Flash + 2 MB PSRAM](https://www.adafruit.com/product/5438)
One of our star Feathers is the [Adafruit HUZZAH32 ESP32 Feather](https://www.adafruit.com/product/3405) - with the fabulous ESP32 WROOM module on there, it makes quick work of WiFi and Bluetooth® projects that take advantage of Espressifs most popular chipset. Recently we had...

In Stock
[Buy Now](https://www.adafruit.com/product/5438)
[Related Guides to the Product](https://learn.adafruit.com/products/5438/guides)
### Adafruit ESP32 Feather V2 with Headers -  8MB Flash + 2 MB PSRAM

[Adafruit ESP32 Feather V2 with Headers -  8MB Flash + 2 MB PSRAM](https://www.adafruit.com/product/5900)
One of our star Feathers is the [Adafruit HUZZAH32 ESP32 Feather](https://www.adafruit.com/product/3405). With the fabulous ESP32 WROOM module on there, it makes quick work of WiFi and Bluetooth® projects that take advantage of Espressifs' most popular chipset. Recently, we...

In Stock
[Buy Now](https://www.adafruit.com/product/5900)
[Related Guides to the Product](https://learn.adafruit.com/products/5900/guides)

## Featured Products

### STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long

[STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long](https://www.adafruit.com/product/4399)
This 4-wire cable is&nbsp;50mm / 1.9" long and fitted with JST SH female 4-pin connectors on both ends. Compared with the chunkier JST PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/4399)
[Related Guides to the Product](https://learn.adafruit.com/products/4399/guides)
### Lithium Ion Polymer Battery Ideal For Feathers - 3.7V 400mAh

[Lithium Ion Polymer Battery Ideal For Feathers - 3.7V 400mAh](https://www.adafruit.com/product/3898)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of **400mAh** for a total of about 1.9 Wh. If you need a larger (or smaller!)...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3898)
[Related Guides to the Product](https://learn.adafruit.com/products/3898/guides)

## Related Guides

- [No-Code Battery Monitoring with WipperSnapper](https://learn.adafruit.com/no-code-battery-monitoring-with-wippersnapper.md)
- [Edge-Lit Tavern Sign with WLED - Control with WiFi or IR Remote](https://learn.adafruit.com/edge-lit-tavern-sign-with-wled-control-with-wifi-or-ir-remote.md)
- [No-Code DS18B20 Temperature Sensor with WipperSnapper](https://learn.adafruit.com/using-ds18b20-temperature-sensor-with-wippersnapper.md)
- [Sound Reactive Paper Lanterns with LedFx](https://learn.adafruit.com/sound-reactive-paper-lanterns-with-led-fx.md)
- [Using Piezo Buzzers with WipperSnapper](https://learn.adafruit.com/using-piezo-buzzers-with-wippersnapper.md)
- [CircuitPython on ESP32 Quick Start](https://learn.adafruit.com/circuitpython-with-esp32-quick-start.md)
- [CircuitPython Web Workflow Code Editor Quick Start](https://learn.adafruit.com/getting-started-with-web-workflow-using-the-code-editor.md)
- [Severence-Inspired Lumon Bluetooth Speaker](https://learn.adafruit.com/bluetooth-speaker.md)
- [Networking in CircuitPython](https://learn.adafruit.com/networking-in-circuitpython.md)
- [Introducing Adafruit Feather](https://learn.adafruit.com/adafruit-feather.md)
- [Holiday Lights: Easy DIY Christmas Wreath & Garland with WLED](https://learn.adafruit.com/holiday-garland-decor-app-control-with-no-coding.md)
- [WiFi Jellyfish Lantern with WLED](https://learn.adafruit.com/wifi-jellyfish-lantern-with-wled.md)
- [Monster Matrix with WLED](https://learn.adafruit.com/monster-matrix-with-wled.md)
- [How To Install Drivers for WCH CH34X / CH340 / CH341 / CH342 / CH343 / CH344 / CH346 / CH347 / CH9101 / CH9102 / CH9103 / CH9104 / CH9111 / CH9114 / CH9143 USB to Serial Chips](https://learn.adafruit.com/how-to-install-drivers-for-wch-usb-to-serial-chips-ch9102f-ch9102.md)
- [LED Festival Coat with Mapping and WLED ](https://learn.adafruit.com/led-festival-coat-with-mapping-and-wled.md)
