Now that we have PinCapture, I am working on reading a DHT11 Temp and Humidity sensor. But, I need some hints.
The device wants the data line brought low for a time and then it will start sending back 40 bits of data (varying the length of time low for a 0 or 1). Reading the 40 bits back seems like it will be easy with PinCapture. Just set up a 40 element buffer and tell it to go. The timings will tell me if it is a long or short bit. No problem.
What I haven’t figured out is how to send the start bit then turn the line around with the required 40us to start receiving the first bit.
Something like this:
myTristatePort.Active = true;
myTristatePort.Active = false;
Is there a better way? Do you think it will turn around within 40us to get the first return data bit? I have doubts. Any suggestions?