-
Edit: This Q&A was called something else but has been changed as I have made several tests and adjustments. Hi, I have two i2c devices connected to an ESP 12F on GPIO2 and GPIO14 (SDA and SCL respectively) The SHT4x works with the preset drivers, I am trying to change to script so I can read from both the SHT4x as well as the AGS10 (datasheet: http://www.aosong.com/userfiles/files/Datasheet%20AGS10.pdf: which appears to be reading 5 bytes from 0x00) using script. I'm able to read the sensor using a minimal wire code from the Arduino IDE
I'm trying to replicate this in script but am not sure how to 1)Separate out the bytes, and 2) Reduce the i2c speed. Can anyone advice please. Here is where I am so far on my current script. The first byte from 0x00 (the status bit) reads 16 which is the same as when I'm reading it from the code above, but I'm not sure how to extract the other values.
Output:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 13 replies
-
If you want to drive the SHT4x from Scripting-Language, you need to disable the native driver using I'm not sure that scripting language can work with 2 different I2C peripheral at the same time. |
Beta Was this translation helpful? Give feedback.
Sorted it for both sensors (without slowing down i2c speed, keeping stock values whatever they are) as :