MLAB-project / pymlab

Library for interfacing with MLAB modules in Python
https://www.mlab.cz
GNU General Public License v3.0
10 stars 1 forks source link

SDP610 and PYMLAB #10

Closed FredyCEMIM closed 6 years ago

FredyCEMIM commented 8 years ago

Good morning. FIrst of all, thank you for the link to this github Project. I am trying to use a SDP610 sensor and I have installed pymlab in a Raspberry Pi 3: $ sudo apt-get install git python-setuptools python-smbus $ git clone https://github.com/MLAB-project/pymlab $ cd pymlab/ $ sudo python setup.py develop Then I have tried to run the example: $ sudo python diffp_example.py but this returns: Invalid number of arguments. Usage:diffp_example.py #I2CPORT [Config numer] I understand that this error means that I have to write something like that: $ sudo python diffp_example.py #I2CPORT 1 or similiar but I am newbie in python so I don't know what to do... If i run i2cdetect -y 1 the sensor appears at 0x40 Sorry if the question is very stupid. Thanks Fredy

kaklik commented 8 years ago

hello, It is almost correct.. You should simply run the command: sudo python diffp_example.py 1 1

The first 1 is I2C port number (from i2cdetect -l ) The second 1 is internal diffp_example.py script configuration number. The script contains two I2C networks configurations 0 and 1.

FredyCEMIM commented 8 years ago

Ohhhh. Thank you so much :) and sorry again for the question (I need a Python manual for dummies ;) ) Now it is run OK Thank you again