I2C Connection Pins on the WeMos D1 Mini (ESP8266)

This blog post details the I2C connections on the WeMos D1 Mini (ESP8266).

Using I2C connections with the WeMos D1 Mini (ESP8266)

Within IoT devices the I2C protocol is used a lot for multi-master multi-slave communication as a relatively simple serial bus. You will find that small sensors will report their data on the I2C bus. This means it can be important to know how to connect your IoT device to an I2C bus.

To connect something to the I2C bus you will need to join both devices SCL and SDA pins together. These two I2C connections are not labelled on the WeMos’s circuit board so this makes it a bit harder to use.

For the WeMos D1 Mini the pins as as follows:

I2C Pin Pin on the WeMos
SCL (Serial Clock)D1
SDA (Serial Data)D2

Once connected you will be able to talk to your I2C devices using the WeMos D1 Mini.

Important reminder about Pin numbers and the Arduino IDE

It is important to remember that the pin mappings for the WeMos D1 are not the same as the standard Arduino Pins. What this means is that Pin 1 on the Arduino is not represented as 1.

You will need to use the WeMos constants for this to correctly address the pins.

I talk more about this in my blog post Pin Numbering for WeMos D1 mini (ESP8266).

If you have any questions about the I2C pins on the WeMos feel free to ask below in the comments.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.