Last modification: 24.09.2024 Contributor: Marian Minar
Dont forget to add if you were satisfy with the software!
Twitter: News and statuses
NEW! SourceForge.net:
Project eCScope was created to show progress in development. Insert the #eCScope keyword into the issue section.
PyPi module: ecomet-i2c-sensor
Current release: 0.1.8
New features
pip install ecomet-i2c-sensors
Test release: 0.1.9.post3
pip3 install -i https://test.pypi.org/simple/ecomet-i2c-sensors
Wiki Hardware prototypes boards: link
Scope: The Driver for I2C Chip maintenance from Raspberry PI 1B+ and above and AllWinner CPU. This code tools contains python & free pascal code focused to I2C communication of raspberry pi with IOT modules.
Current CHIP maintained:
List of modules:
Software for Chips:
Chip | Python 3 driver | FPC GUI | Hardware Board | Contributor Notes | Planned work | Requestor Interests |
---|---|---|---|---|---|---|
!NEW! AS3935 | yes check | no | ||||
AXP209 | yes check | no | A10 Olimex | Only partially implemented pdf, check | ||
EEPROM 24cXXX | yes | no | I01,I02,I03,I04 | currently tested at 24c01,24c04,24c08,24c16,24c32,24c64 | ||
EMC2301 | yes | yes | I02 | add EMC2302-05 chips in design | ||
HDC1080 | yes | yes | I03,I04 | !NEW! python lib not compatible with previous version, see test script | ||
HTU21D | yes | no | I03,I04 | |||
INA226, INA260 | yes | yes | I01 | |||
ISL2802x | in progress | no | ||||
MCP3221 | yes check | no | ||||
MS5637 | yes | no | I04 | |||
PCA9557 | yes | no | I01 | |||
PCA9632 | yes | yes | I04 | |||
SN-GCJA5 | yes check | no | ||||
SGP40 | yes check | no | ||||
SSD1306 | yes | no | I01 | |||
TSL25911 | yes check | no |
Setting of config file for ecomet-i2c-sensors python library:
Library is looking in directory ~/.comet for file config.yaml that contains i2c parameters for custom linux distribution and I2C EEPROM memory setting. Here is a example of config file content:
comet@orangepizero2:~/.comet $ cat config.yaml
--- # The I2C config file
i2c:
smb: i2c-3 # set bus i2c-1
smb_detect: 0..3 # list of monitored smb bus by i2cdetect
eeprom:
ic: '24c01'
slaveaddr: 0x50
writestrobe: 26 # hold pin low to write to eeprom
sensor:
ms5637:
pressure:
{ min: 600, max: 1300 }
sn_gcja5:
PM1_0:
{ min: 0, max: 1200 }
PM2_5:
{ min: 0, max: 1200 }
PM10:
{ min: 0, max: 1200 }
parameter | sub-parameter | description | example value |
---|---|---|---|
smb: | name of active i2c in /dev | i2c-1 | |
smb_detect: | list of monitored i2c neworks used by command i2c_ecomet_detect | 0..1 | |
eeprom: | eeprom section | ||
ic: | 24x00 series of eeprom chip name | '24c01' | |
slaveaddr: | address of eeprom chip in hex | 0x50 | |
writestrobe: | GPIO pin number used as CS (chip select) signal for eeprom IC | 26 | |
sensor: | part for setting particular sensors | ||
ms5637: | preasure min max | { min: 600, max: 1300 } | |
sn_gcja5: | air quality min max |
Note: Currently only one eeprom chip could be added.
Alternative command for I2C chip detection:
Here is alternative command to i2cdetect for detection of active I2C chips at I2C bus: i2c_ecomet_detect.py
pi@raspberrypi:~/ecomet_i2c_raspberry_tools/bin $ python3 i2c_ecomet_detect.py
3.9.9 (main, Jan 16 2022, 22:51:22)
[GCC 11.2.0]
ecomet.Board_Platform: INFO Start logging ...
ecomet.Board_Platform: INFO Board platform: RASPBERRY_PI 4B:1.4
ecomet.Board_Platform: INFO Number of I2C buses at the board: 2
ecomet_i2c_sensors.platform.i2c_platform: INFO >>> Testing at bus: 0
ecomet_i2c_sensors.platform.i2c_platform: INFO No Chip connected
ecomet_i2c_sensors.platform.i2c_platform: INFO >>> Testing at bus: 1
ecomet_i2c_sensors.platform.i2c_platform: INFO Default bus number: 1
ecomet_i2c_sensors.platform.i2c_platform: INFO Identified Slaves Chips: 0xc:0x1a:0x2f:0x40:0x50:0x51:0x52:0x53:0x54:0x55:0x56:0x57:0x62:0x70:0x76
Requestor Interests: If you would like to reqest some new feature or add some new Chip at the development list let me know by adding issue or by email.