|
Revision 4219, 0.7 kB
(checked in by mmh, 2 years ago)
|
Python bindings to i2c-dev devices, supporting SMBus transactions.
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
README: py-smbus |
|---|
| 3 |
|
|---|
| 4 |
Prerequisites: |
|---|
| 5 |
Be sure to build and install the lm-sensors userspace first. This package |
|---|
| 6 |
requires one of the header files from that. |
|---|
| 7 |
|
|---|
| 8 |
To build: |
|---|
| 9 |
$ python setup.py build |
|---|
| 10 |
|
|---|
| 11 |
To install (will also build if necessary): |
|---|
| 12 |
$ python setup.py install |
|---|
| 13 |
|
|---|
| 14 |
For general build/install help: |
|---|
| 15 |
$ python setup.py --help-commands |
|---|
| 16 |
|
|---|
| 17 |
Frequently Answered Question: |
|---|
| 18 |
|
|---|
| 19 |
Q: It's throwing exceptions, nothing works, what's wrong? |
|---|
| 20 |
|
|---|
| 21 |
A1: You need write permissions to the i2c-dev devices. Try running as root. |
|---|
| 22 |
|
|---|
| 23 |
A2: Addresses in Linux/I2C are the most-sig 7 bits, right-justified. E.g. |
|---|
| 24 |
if your device uses address 0xc0 to write and 0xc1 to read, then use |
|---|
| 25 |
address 0x60 with this module. |
|---|
| 26 |
|
|---|
| 27 |
A3: Some other kernel driver has claimed that I2C address. Unload it first. |
|---|
| 28 |
|
|---|