Giter VIP home page Giter VIP logo

Comments (5)

pasko-zh avatar pasko-zh commented on July 23, 2024

My first impression is the following:
According to the datasheet, the HTU21 has a fixed i2c address of 0x40: "... I²C header consist of a 7-bit I²C device address 0x40 ..." You can also find it in the adafruit library.

But you are trying to talk to a slave at address 0x80 in brzo_i2c_start_transaction(0x80, 100). You should use brzo_i2c_start_transaction(0x40, 100) instead. Note that brzo_i2c_start_transaction takes the 7-bit slave address, you don't have to shift left the address by yourself, the library takes care of that.

Please let me know, if you were able to read out the User register of your HTU21.
paško

from brzo_i2c.

loewexy avatar loewexy commented on July 23, 2024

I should have mentioned that I tried both adresses 0x40 and 0x80 in fact I also built a loop cycling through all integers from 0 to 255 with no success.

from brzo_i2c.

pasko-zh avatar pasko-zh commented on July 23, 2024

I assume your hardware setup (pullups etc) is fine and the HTU21 works with the adafruit (wire) library, right? Currently I don't have an HTU21, so I cannot check. And I will be away from tomorrow on (holidays without IoT ;) but when I return, I will check.

from brzo_i2c.

loewexy avatar loewexy commented on July 23, 2024

The hardwaresetup should be correct. The Wire Libary did not work correct for me. I viewed the Signals on a scope and there were only two pulses. On on SDA one on SDL but it was no valid I2C. This is the reason I searched for another libary.

from brzo_i2c.

pasko-zh avatar pasko-zh commented on July 23, 2024

brzo i2c is working with HTU21:

I've added an HTU21 example. It outputs the temperature (without CRC checking) every 5 seconds.
I had a couple of issues with adafruit's breakout board, please read the readme.

Please note that the current version 1.00 of brzo i2c supports only clock stretching up to 5 msec. I will enhance this to support longer timouts, see issue..
Therefore, get_temp_hold_master(float *t) will lead to brzo error 8, since HTU21 needs up to 50 msec.
But I've already changed this in my local version, and I can confirm it is working.

EDIT: Version 1.01 released, supports longer timeouts now.

from brzo_i2c.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.