Skip to content

A Python module for accessing multiple i2c devices through only one i2c adapter under Linux.

Notifications You must be signed in to change notification settings

yjdwbj/pyi2cdev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Python module for accessing multiple i2c devices through only one i2c adapter under Linux.

Driver multiple i2c devices on EAIDK-310 through one i2c adapter under Linux.

Linux System

  • Allows users to access i2c devices without root privileges.
~$ sudo usermod -a -G i2c <login user>
  • i2cdetect
~$ i2cdetect -yes 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1e --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- 77

Introduction: Hardware Devices

BMP180

  • BMP180 is a nice tiny sensor which can give the values of
  • Atmospheric Pressure
  • Temperature
  • Altitude

HMC5883L

  • The Honeywell HMC5883L is a surface-mount, multi-chip module designed for low-field magnetic sensing with a digital interface for applications such as low-cost compassing and magnetometry.The HMC5883L includes our state-of-the-art, high-resolution HMC118X series magneto-resistive sensors plus an ASIC containing amplification, automatic degaussing strap drivers, offset cancellation, and a 12-bit ADC that enables 1° to 2° compass heading accuracy.

SH1106(or SSD1306)

  • The SH1106 display is 128x64 pixels, and the board is tiny. The vendor told me it would be compatible with SSD1306, but the one I tested mine didn't. The driver in Python using I2C on the EDIDK-310.

Python Runtime

  • install pipenv environment
~$ pipenv install # or pipenv install --three
  • enter pipenv environment
~$ pipenv shell
  • run
~$ python main.py

sh1106.png sh1106_run.gif

About

A Python module for accessing multiple i2c devices through only one i2c adapter under Linux.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages