# ICM20948 - pimoroni\_i2c object has no attribute write\_byte\_data

**URL:** <https://forums.pimoroni.com/t/icm20948-pimoroni-i2c-object-has-no-attribute-write-byte-data/23555>\
**Category:** Support\
**Created:** [December 18, 2023, 1:02am UTC](https://forums.pimoroni.com/t/icm20948-pimoroni-i2c-object-has-no-attribute-write-byte-data/23555 "2023-12-18T01:02:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ggeoffre](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/ggeoffre/32/10393_2.png) [@ggeoffre](https://forums.pimoroni.com/u/ggeoffre)\
**Post date:** [December 18, 2023, 1:02am UTC](https://forums.pimoroni.com/t/icm20948-pimoroni-i2c-object-has-no-attribute-write-byte-data/23555/1 "2023-12-18T01:02:09Z")

</div>

I am using a Pico Explore Basewith a Raspberry Pi Pico W running the latest MicroPython v1.21.0, picow v1.21.0 on 2023-10-06 from github =\> pimoroni =\> pimoroni-pico =\> releases.

I have been successful at getting the BH1745 and BME688 Breakouts Boards running using the ‘embedded’ **breakout\_bme68x** and **breaklout\_bh1745** modules. I have also been successful at getting the Pimoroni ICM20948 Breakout Board running with CircuitPython 8.2.8 when connected using the onboard Stemma/QT connector. So I know that I have a good ICM20948 chip.

However, there is not an embedded ICM20948 breakout module included in the Pimoroni Pico Explorer MicroPython build ([Issue #15](https://github.com/pimoroni/BreakoutGarden/issues/15)). And I have not been successful at getting [Pimoroni’s ICM20948](https://github.com/pimoroni/icm20948-python) python driver working with the Pico Explorer Base build of MicroPython either.

This code (example code from the driver’s repo):

```auto
import time
from pimoroni_i2c import PimoroniI2C
from icm20948 import ICM20948
from pimoroni import PICO_EXPLORER_I2C_PINS

I2C = PimoroniI2C(**PICO_EXPLORER_I2C_PINS)
icm = ICM20948(104,I2C)

while True:
    x, y, z = icm.read_magnetometer_data()
    ax, ay, az, gx, gy, gz = icm.read_accelerometer_gyro_data()
    print("""
Accel: {:05.2f} {:05.2f} {:05.2f}
Gyro: {:05.2f} {:05.2f} {:05.2f}
Mag: {:05.2f} {:05.2f} {:05.2f}""".format(
        ax, ay, az, gx, gy, gz, x, y, z
        ))
    time.sleep(0.25)

```

Produces this error:

`\'pimoroni_i2c\' object has no attribute \'write_byte_data\`

I was able to get past the initialization error where I kept getting errors that tried to run exception code in the driver that needed to import **smbus** (_which is not present_) by fixing the way that the I2C bus was being initiated in the original example code. So it now looks like I have a valid instance of the ICM20948 object that the above code is trying to work with.

I am running into similar issues getting the Pimoroni PA1010D Breakout board up and running on the Pico Explorer as well. That drive is also needing to import **smbus**. Seems like when there are embedded drivers for breakout boards, everything just works perfectly. If not…

**Are Pimoroni’s stand-alone libraries for various Breakout Boards compatible with the build of MicroPython that was custom-built for the Pico Explorer board?**

Just looking for a way to get the Pimoroni ICM20948 9DoF Motion Sensor Breakout Board to work with the Pimoroni Pico Explorer Base running MicroPython on a Pico W.
