I am a newbie in this community, and just joined in the last month. It is a honor to start a conversation here in the forum.
Currently, I am trying to integrate DHT11 into my robot. I am not very sure about how to apply this single-wire two-way serial interface with ezb v4. Could everyone please share his/her knowledge about this here?
I have gone through the past discussions about this topic, and it seems no progress has been made during the past one year.
So is it possible to use single-wire two-way serial interface with ezb v4? As far as I know this single-wire serial communication is kind of popular for MCU. Hope to hear from DJ regarding this issue.
Upgrade to ARC Pro
Get access to the latest features and updates with ARC Early Access edition. You'll have everything that's needed to unleash your robot's potential!
if you have a shield with some electronics and i2c protocol then you can use the EZB i2c interface.
I recommend looking for a I2c sensor, one example:
check the library code here:
cycles of 40, 80 milliseconds.
I had inconsistent readings using windows IoT and a raspberry due to the timings.
I gave up, i used an i2c sensor.
Let me clarify more about this issue:
First, I do not think the power supply is an important/serious issue here, 3.3 V or 5V. At least, The solution is obviously approachable, since it is not that hard to find a way to convert from 3.3V to 5V, or 5V to 3.3V.
Second, most importantly, what matters here is the data communication. What I got is not just a DHT11 sensor, but a DHT11 sensor module, with the sensor and its extension circuit. The module has three pins: GND, Power, and data (digital).
Why here is only one digital I/O for the sensor module? Because it uses 1-wire bus communication system! The single digital I/O seems to transport data in both ways. For those who are not familiar with 1-wire bus, here is the wikipedia link: https://en.wikipedia.org/wiki/1-Wire
So what bothers me is whether this 1-wire bus system can be used in ARC?
Of course, 1-wire bus protocol can be used with most MCUs by C programming. Then my doubt is can ezb v4 accepts 1-wire bus protocol? or it will get very complicated.
Moreover, thank you, @ptp. Using an alternative humidty/temperature sensor, matching the existing interface of ezb v4, is also a good choice, for sure.
Everyone, please state your ideas.
However, the short answer to this sensor is to attach it to an Arduino, there are many examples for this sensor and the Arduino out there, all work well.
Then use the EZ-B to talk to the Arduino and get the data from the sensor via Serial or I2C.
That was much easier than attempting to figure out how the DHT11 "works". The sensor sends both Humidity and Temp data at the same time. Why waste the EZ-B/EZ-Builders resources on deciphering this when Arduino can do it and simply send the data as two separate values depending on what you call for?
However, I will say that the DHT11 isn't that accurate - at least mine isn't. The temperature can fluctuate by about 3 degrees Celcius in either direction