On Thursday 13 November 2014 07:37:25 劉家樑 wrote:
> Thanks for your reply and suggestion.
> In my experience, I tried to implement I2C in AT89S51 so is that possible
> to implement I2C in some pin in BBB and build a library by myself like in
> AT89S51?
> The AM2320 I bought have SCL and SDA so it should not be serial in one wire.
> I still have no any idea to control the device til now =.=
> Anyway, thanks for your attention ^_^
searching on the net I think I may have found what you are using.  It is not
an AM2320, but rather an AM2321.  This DOES have an I2C interface unlike
the AM2320.

On GitHub you will find a library for talking to the AM2321,but it is written 
in C and using the wiring library so it is not directly usable on a BBB, but
it confirms the address you gave and shows the sequence of bytes you
need to send to get back the temperature and humidity.  I suggest you 
read up on Linux support of I2C.  To access this from Java you will need
JNA (which is packaged for Debian), and you will find some useful tips
if you read:-

http://www.raspberrypi.org/forums/viewtopic.php?p=187073#p187073

Don't be put off by it being for the Raspberry Pi, Linux is Linux what 
ever the hardware it is running on.

David

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to