Connections

Example of a DIY build using a Wemos d1 mini, a Pro Micro and a Neopixel LED

Here’s a map of the pins that need to be connected.

ESP8266Atmega32u4
D1 alias GPIO 5D3 alias SCL
D2 alias GPIO 4D2 alias SDA
GNDGND

Both chips have to be powered in order to work.
To share power between both, you need a voltage regulator that takes 5V and turns it into 3.3V.
It’s because USB runs at 5V but the ESP8266 runs at 3.3V. Luckily most development boards have such a regulator on board.
DO NOT CONNECT ESP8266 VCC to the ATMEGA32u4 VCC, it will kill the ESP826. Instead look for the 5V or VIN pin on your dev board, as those will be connected to the regulator.

ESP8266 Dev BoardAtmega32u4
5V or VINRAW, 5V or VIN

If you like to add a Neopixel (WS2812b) LED:

Atmega32u4Neopixel LED
7*DI alias Data, In
5V alias VCC5V alias VCC
GNDGND

* The Data pin can be changed later on in the software, pin 7 is just an example.