# MicroPython I2C on Pimoroni Tiny2040

**URL:** <https://forums.pimoroni.com/t/micropython-i2c-on-pimoroni-tiny2040/23477>\
**Category:** Support\
**Created:** [December 10, 2023, 11:36pm UTC](https://forums.pimoroni.com/t/micropython-i2c-on-pimoroni-tiny2040/23477 "2023-12-10T23:36:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yasha](https://avatars.discourse-cdn.com/v4/letter/y/e495f1/32.png) [@Yasha](https://forums.pimoroni.com/u/Yasha)\
**Post date:** [December 10, 2023, 11:36pm UTC](https://forums.pimoroni.com/t/micropython-i2c-on-pimoroni-tiny2040/23477/1 "2023-12-10T23:36:44Z")

</div>

I’m trying to interface with an I2C board using MicroPython on a Pimoroni Tiny2040.

The issue I’m having is that I consistently get a “ValueError: bad SCL pin”. I’ve looked through the examples on GitHub, but there don’t seem to be any which are specifically for the Tiny2040 and use I2C.

I’ve installed Micropython - the RP2 family, Tiny 2040 (with Pimoroni libraries) variant, version 1.21.

Here’s a MWE of my code.

```auto
from pimoroni_i2c import PimoroniI2C

pins = {"sda": 16, "scl": 15}
i2c = PimoroniI2C(**pins)

```

Any insight will be gratefully received.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [December 11, 2023, 1:09am UTC](https://forums.pimoroni.com/t/micropython-i2c-on-pimoroni-tiny2040/23477/2 "2023-12-11T01:09:38Z")

</div>

Wrong Pin numbers, I’m thinking?  
And I wouldn’t fault you for using them. Not based on the pinout on the product page.  
I had a look see at the schematic.  
[tiny2040.sch (shopify.com)](https://cdn.shopify.com/s/files/1/0174/1800/files/Tiny2040_PIM558_schematic.pdf?v=1631525309)  
And I’m thinking  
GP0, SDA, is Pin 2 ?  
and  
GP1, SCL, is Pin 3 ?
