Can’t Get I2C to Work on an Arduino Nano? (Pinout Diagrams)

Maybe it is because many of the pinout diagrams for the Nano have SCL and SDA on the wrong pins.

You probably think (as I did and as the guys laying out the pinout diagrams) that these would be on digital pins, but they are not. They are on analog pins.

SDA              Pin A4
SCL              Pin A5

Once you wire it up correctly, this arduino I2C scanner will let you know you have proper connectivity and the address for the device:

Jump to Pinout for:

Here is a correct Nano pin out diagram:

And while I’m at it, here is one for an Uno:

and a Mega

Teensy 3.1


Raspberry Pi


NodeMCU Pinout

This entry was posted in c-arduino, c-tinys. Bookmark the permalink.

16 Responses to Can’t Get I2C to Work on an Arduino Nano? (Pinout Diagrams)

  1. Mr C says:

    Thanks for posting the pinouts! I was going to tediously go through the whole thing and map them out myself but no need now.

    Saved on the hard drive for later reference

  2. Blue Chip says:

    These pictures are awesome – I wish you had provided a key as to what the labels means. I’ve deduced most of them on the Nano (EG. wiggly line means PWM enabled on one of three timers and pale-blue is a type of serial IO) but others (EG. Yellow circle and white square) ellude me :/

  3. beil says:

    Awesome thanks mate and keep up the excellent work! – saving us lots of frustration 🙂

  4. Sylvain says:

    This is amazing ! Beautifull & usefull pinout diagrams !!!

  5. okierie says:

    Good for quick reference! 😉

  6. Great job. very useful. LIKE !!

  7. HiJoe says:

    WOW, that is what I am looking for! Awesome overview! THANKS!

  8. David Esquivel says:

    This helped me out. Thanks a lot

  9. ARD2560 says:

    Fig. Arduino MEGA is incorrect pin INT0 – INT5. see

    • Dan TheMan says:

      I think you are misreading. The arduino doc you mention indicates interrupts on pins 2, 3, 18, 19, 20, 21.

      If you look at the IDE pins in the diagram (kind of a pink color), you’ll see interrupts 0-5 are assigned to pins 2, 3, 18, 19, 20, 21.

      If that is wrong, please explain. Thanks.

  10. ARD2560 says:

    I mean the assignment of interrupt number to dig.pins , Mega2560:

    INT0 INT1 INT2 INT3 INT4 INT5…: 2 3 21 20 19 18 – see tab. down
    bigdanzblog.wordpress…: 21 20 19 18 2 3

    (I am sorry, I use Google Translate.)

  11. You forgot OC0B on pin 5 (PD5) of the Arduino Uno.

  12. AuLeeFor says:

    Sometimes it’s not a pin out problem. I have an barometer sensor can run either 3.3V or 5V.
    When connected to 3.3V on Nano it does’nt work but on 5V. I’ve checked 3.3 voltage is OK.
    On Uno board however it works from 3.3V Pin.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s