![circuit maker 2000 library circuit maker 2000 library](https://cdn-learn.adafruit.com/assets/assets/000/052/046/original/adafruit_gemma_IMG_1562_2000.jpg)
Print the temperature and humidity in the Serial Monitor: Read the temperature and the humidity:įloat tempF = tempC * 1.8 + 32 // converts Celsius to Fahrenheit Begin serial communication at a baud rate of 9600: Create a new instance of the Adafruit_AM2320 class:Īdafruit_AM2320 AM2320 = Adafruit_AM2320() * Example code for AM2320 I2C temperature and humidity sensor with Arduino.
![circuit maker 2000 library circuit maker 2000 library](https://getintopc.com/wp-content/uploads/2014/03/Diptraces-download-setup-free.png)
To copy the code, click on the button in the top right corner of the code field. You can upload the example code to your Arduino using the Arduino IDE. The temperature measuring range of the sensor is -40 to 80 degrees Celsius, with a stated accuracy of ± 0.5 ☌. The sensor consists of a capacitive moisture sensing element and a high precision integrated temperature measuring element connected to a microprocessor.