# I2C Temp Sensor not found

**URL:** <https://forums.openmv.io/t/i2c-temp-sensor-not-found/9331>\
**Category:** OpenMV Boards\
**Created:** [March 14, 2024, 7:23pm UTC](https://forums.openmv.io/t/i2c-temp-sensor-not-found/9331 "2024-03-14T19:23:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pelican](https://avatars.discourse-cdn.com/v4/letter/p/7993a0/32.png) [@pelican](https://forums.openmv.io/u/pelican)\
**Post date:** [March 14, 2024, 7:23pm UTC](https://forums.openmv.io/t/i2c-temp-sensor-not-found/9331/1 "2024-03-14T19:23:37Z")

</div>

I am currently using the Adafruit MCP9808 temperature sensor with my OpenMV RT1062 board and trying to have the board read the temperature from the sensor over I2C. I have the connections like this:  
Vin (sensor) → 3.3V (board)  
GND → GND  
SCL → SCL  
SDA → SDA  
And the adafruit temperature sensor I am using hasing built in 10k Ohm pull up resistors. This is my code so far, and I get the poppup error when I try to read from the temperature sensor:

 ![tempsensor](https://canada1.discourse-cdn.com/flex029/uploads/openmv1/original/2X/0/0895896c7aecea195ed6d04342a45a748490af8a.png)  
and I get this output from my code:

> > > Checking I2C Conecction…  
> > > [21, 72]

Traceback (most recent call last):  
File “”, line 56, in   
OSError: [Errno 19] ENODEV

Any ideas what I might be doing wrong here?

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [March 14, 2024, 7:48pm UTC](https://forums.openmv.io/t/i2c-temp-sensor-not-found/9331/2 "2024-03-14T19:48:25Z")

</div>

I think you need to use bus 1.

`i2c = I2C(1)`

---

<div class="post-metadata">

**Author:** ![pelican](https://avatars.discourse-cdn.com/v4/letter/p/7993a0/32.png) [@pelican](https://forums.openmv.io/u/pelican)\
**Post date:** [March 15, 2024, 1:56am UTC](https://forums.openmv.io/t/i2c-temp-sensor-not-found/9331/3 "2024-03-15T01:56:18Z")

</div>

I get the same error, except when I print out the results of scan() i get [] instead of [21, 72]

---

<div class="post-metadata">

**Author:** ![pelican](https://avatars.discourse-cdn.com/v4/letter/p/7993a0/32.png) [@pelican](https://forums.openmv.io/u/pelican)\
**Post date:** [March 15, 2024, 2:24am UTC](https://forums.openmv.io/t/i2c-temp-sensor-not-found/9331/4 "2024-03-15T02:24:40Z")

</div>

Update: with the following code, I get this output from the serial terminal (I still think something isn’t right here):

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/openmv1/original/2X/d/db9dc25c978047d39d5a13bed5ff7371a4a3ac3d.png)

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [March 15, 2024, 2:56pm UTC](https://forums.openmv.io/t/i2c-temp-sensor-not-found/9331/5 "2024-03-15T14:56:26Z")

</div>

When you were using 2 that was showing devices in an internal I2C bus.

With 1 it will show external devices. Since it’s not showing any devices then something is wrong with the I2C bus wires. Please check how SDA/SCL are. Connected along with your pull up resistors.

The driver works though since it’s the same code for internal/external buses.
