Go to advanced search

by dalexgray
Thu Aug 21, 2014 11:14 pm
Forum: Python
Topic: Read 3 bytes on SMBus without register?
Replies: 5
Views: 7188

Re: Read 3 bytes on SMBus without register?

Driver done! The trick was using i2c_read_device(handle, count) a function not available from SMBus. Thanks for all the help. HTU21DF.PY ################################################################ # Raspberry Pi Driver for Adafruit HTU21D-F # Go buy one at https://www.adafruit.com/products/1899...
by dalexgray
Wed Aug 20, 2014 10:35 pm
Forum: Python
Topic: Read 3 bytes on SMBus without register?
Replies: 5
Views: 7188

Re: Read 3 bytes on SMBus without register?

Thank you, Joan! That was just what I needed.
I installed pigpio and I was just able to communicate via command line with the sensor. I got all three bytes no sweat. I'm so excited!

I'll post my results here so anyone else using this sensor with Python can get a hand.
by dalexgray
Wed Aug 20, 2014 2:15 am
Forum: Python
Topic: Read 3 bytes on SMBus without register?
Replies: 5
Views: 7188

Re: Read 3 bytes on SMBus without register?

Is there a way to do that with SMBus or another function in Python? As far as I know SMBus takes the 7 bit address, 0x40, and shifts it to 0x80 by adding the write bit "0" to the end. I then do a read command which takes the 7 bit address and shifts it to 0x81 by adding the read bit "1." What I can'...
by dalexgray
Tue Aug 19, 2014 11:27 pm
Forum: Python
Topic: Read 3 bytes on SMBus without register?
Replies: 5
Views: 7188

Read 3 bytes on SMBus without register?

I'm trying to use a HTU21D-F temperature and humidity sensor in a Pi project. I seem to be able to send commands to it, but I'm having trouble reading back anything. One triggers a reading by sending a single byte to the HTU21D-F e.g. bus.write_byte(0x40, 0xE5) and it sends back 3 bytes of informati...

Go to advanced search