Skip to main content

BMI260/BMI270 I2C Python library (bare bones)

Project description

BMI260/BMI270 I2C Python Implementation - Version: 0.4.5

Bare bones BMI260/BMI270 I2C Python implementation. This was a project for my practical phase at my University and my first time working hands on with IMUs.

Fork

  • Added BMI260 support

Installation

The package is available on pypi.org.

You can install this package using this command:

pip3 install bmi260

For a Raspberry Pi Setup add/change this line in /boot/config.txt to your desired baudrate:

dtparam=i2c_baudrate=400000

Reboot your Raspberry Pi after applying the change.

Usage

Make sure these lines are connected: GND, 3V3, SDA, SCL

If you are using the SparkFun SPX-17353 BMI270 Breakout Board, you can easily connect them using a 1mm 4-pin JST connector cable. (example: Qwiic cables)

Make sure that the device is available at 0x68 or 0x69 i2c address by running this command:

i2cdetect -y 1

The BMI270 requires a config load. This initialization step is necessary to be able to use all its functions.

load_config()

A full power cycle is necessary if you want to load the config again.

Check out examples for more information.

Tested with:

  • Ubuntu 22.04.2 LTS
  • Raspbian 10 - Buster (32 Bit)

Dependencies

requires Python >= 3.7

smbus2 (auto installed)

Manual installation: pip3 install smbus2

Functionality

  • BMI270 class integration
  • load config file into BMI270/BMI260
  • write/read registers
  • a few other functions (see BMI270.py)

Credits & Related links

Troubleshooting

-bash: pip3: command not found

sudo apt install python3-pip

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bmi260-0.4.5.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

bmi260-0.4.5-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

Details for the file bmi260-0.4.5.tar.gz.

File metadata

  • Download URL: bmi260-0.4.5.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for bmi260-0.4.5.tar.gz
Algorithm Hash digest
SHA256 163b94c3af762eb3df5f4cfb12a66651461ec221453e8278256b1ac98c78bbdd
MD5 a12b671e657bff7838be4c3d80d28317
BLAKE2b-256 ec98914ef5588259e060876b0743b21c00a1eb65a74bd04481039be41b3a9e2a

See more details on using hashes here.

File details

Details for the file bmi260-0.4.5-py3-none-any.whl.

File metadata

  • Download URL: bmi260-0.4.5-py3-none-any.whl
  • Upload date:
  • Size: 25.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for bmi260-0.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1f4aef8b8cafa8ac2d4316d60dd77514b352a8b053d50a19c10c5a8e82533b98
MD5 e019109f8cc476f314fb0ba91eb46291
BLAKE2b-256 deec2a53573b0d5853513e0698f644fb396129e7988b96894f6a2704087d4d81

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page