Installation
You can install this library using pip:
pip install MAX17048-smbus
Alternatively, you can install it from source:
git clone https://github.com/Tuxt/MAX17048-smbus.git
cd MAX17048-smbus
pip install .
By default, this installs the library without any I²C backend.
To communicate with the sensor, you must ensure that a supported backend is available:
smbus3- see smbus3 on PyPIsmbus2- see smbus2 on PyPIsmbus- see smbus on PyPI
You can install the library with a specific backend using pip extras:
pip install MAX17048-smbus[smbus3]
pip install MAX17048-smbus[smbus2]
pip install MAX17048-smbus[smbus]
You can also install smbus using system packages:
sudo apt install python3-smbus
If you’re using a Raspberry Pi, make sure I²C is enabled.