Comments (5)
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.
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.
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.
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.
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)
- Implementing I2C slave for MAX11615 not working as expected HOT 4
- I2C stucks after clock stretching time exceeds HOT 25
- Question: Logic Levels and ... HOT 2
- Cannot compile for Heltec Wifi Kit 32 HOT 3
- INA219 HOT 8
- Multiple I2C HOT 2
- gpio_init() will cause I2C bus busy (code: 1) HOT 5
- Migrating ADS1015 from Wire HOT 5
- AM2320 sensor not found HOT 11
- I2C bus handle for multiple instances posibility HOT 1
- Support speeds < 100KHz HOT 2
- after 1 slave fails others stop working HOT 4
- Have you thought about a i2c slave implementation. HOT 2
- Novice obsession HOT 2
- GCC 10 compilation issue with Arduino HOT 5
- SDA set before SCL while preparing STOP in brzo_i2c_read() HOT 7
- MEMW not always present
- Clock stretch logic
- Arduino IDE compile error with new ESP8266 core 3.0.0 HOT 30
- SCL cock stretching HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brzo_i2c.