Does anyone know of a working code sample for a AM2320 using single bus output vs i2c. I have an existing device configured this way and need to read without i2c. My google fu is not getting me anywhere

Why not use I2C?

The AM2320 data sheet clearly describes how to do single bus communications. Write the code and have fun!

I believe that the single bus protocol for the AM2320 is identical to the DHT22. The data sheet shows the connections. I would try to read it with a DHT22 library.

I have tried with the DH22 library and the measurements are really far out, I have tested a couple.

I can’t use i2c as I am replicating existing hardware and would need rewiring (not a problem for me, but trying to make a plug and play solution)

Thanks. I have read the data sheet, but beyond my ability to turn that to functional code, i’m not sure what base libraries to use etc.

the measurements are really far out

This means nothing to us.

It sounds like the library could be working, but you are getting readings that you don't like.

Post examples of "far out" measurements. Test the sensor to see the the readings change as expected with changes in humidity and temperature.

Rewiring is a lot easier than writing a new library, regardless of your skill level.

The AM2320 data sheet clearly describes how to do single bus communications. Write the code and have fun!

It also says that there is example code on the manufacturers website.

I am trying to build something for others to replace a now defunct system, re-wiring is not an option.

Far out in this case is a room temperature of 20c and the sensor reading 1c, then very random measurements in the negative figures, jumping to 30+ degrees or not reading at all.

I have been looking for the sample code but didn’t find it, will try again.

There is no sample code on their website for sure. I have emailed them, might be lucky.

It could be that the DHT22 library uses the same basic protocol but the bit timing or number of bits is incorrect for the AM2320, which some study of the data sheet would reveal.

Consider posting on the Gigs and Collaborations forum section. You may be asked to pay for the help.