2 Linux Device Driver for AM2320
6 Tested on a Raspberry pi 3 with kernel version 4.4.14-v7+
10 You need to have the proper kernel headers installed to build this driver. Use this tool to install kernel headers https://github.com/notro/rpi-source
13 2. git clone linux-am2320-driver
16 5. sudo insmod am2320.ko
17 6. type lsmod and see whether the driver is loaded properly
19 8. if you have a new Raspberry pi (B+, 2 or 3)
21 echo am2320 0x5c > /sys/class/i2c-adapter/i2c-1/new_device
23 else if this is a Rev. 1
25 echo am2320 0x5c > /sys/class/i2c-adapter/i2c-0/new_device
28 ======================
29 cat /sys/bus/i2c/devices/1-005c/temp1_input
31 cat /sys/bus/i2c/devices/1-005c/humidity1_input
35 cat /sys/class/i2c-adapter/i2c-1/1-005c/temp1_input
37 cat /sys/class/i2c-adapter/i2c-1/1-005c/humidity1_input
42 echo 0x5c > /sys/class/i2c-adapter/i2c-1/delete_device
48 Cleaning the directory
49 =======================