Comments (2)
Disclaimer: I've not read the whole data sheet so I might be missing something.
Based on table 9 in the spec it seems to me combining the existing write and read functions should work. My intention with these methods was that they do the ground work to follow the i2c spec and combining them yields the desired write/read sequences needed for the specific device assuming the expect_ack
, use_restart_signal
and end_with_nack
are correctly set.
The 16-bit register you refer to must the the command bytes, They are not an register address so they can we written with the write command.
I don't think I've used clock-stretching, but if it is handled by the underlying driver then it might work as-is. It is also an optional mode of the device so it is not a must to use.
Lastly, the delay between sending commands to the device can be easily handled by checking against a timestamp of the last command and waiting until 1ms has passed.
from smooth.
I plan on submitting a pull request for this sensor today or tomorrow. The PR will include a new function added to I2CMasterDevice called
read_block(uint8_t address, core::util::FixedBufferBase<uint8_t>& data, bool end_with_nack)
This new function does not include the i2c_master_write as the current read does but only implements the i2c_read.
This new function allowed me to read data from the SHT30.
You can close this discussion since we can discuss further in the PR. If you don't like the name of the function then the name can be changed during the PR process.
from smooth.
Related Issues (20)
- Possibility to stop the HTTP server? HOT 4
- style sheet of webpage not respected HOT 5
- Problems with Wifi.cpp and SDCard.cpp HOT 7
- "Slow" reaction on TCP telegrams HOT 16
- Discussion: SPI Master & SDCard updates HOT 2
- SystemStatistics.h needs #pragma once HOT 3
- github actions: compile host and esp32 build in parallel HOT 2
- use full capability of cmake HOT 2
- Change Task tick up once it's created HOT 2
- HTTP Server not working on host system HOT 2
- Byte error in transmission using "responses::FileContentResponse" HOT 4
- C++ code vs expectations HOT 5
- MQTT maximum throughput HOT 10
- Trouble running build_test.sh HOT 7
- βCan you require smooth from a traditional ESP-IDF component? HOT 4
- Connecting to AWS IoT HOT 2
- MQTT user/password authentication HOT 11
- [Feature Request] PPPoS support HOT 1
- MMCSDCard.cpp fails to compile for esp32-c3 HOT 1
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 smooth.