Reading Values from a Temperature Sensor.
Oh it's July !!!
To get temperature and humidity reading from the sensor, our code will perform the following opertions.
- Triggers the slave.
- Waits for it to be idle.
- Reads data to the buffer.
- Reads 20 bit raw humidity data and returns relative humidity.
- Same are the steps for Tempereature reading too.
Note: I2C Protocol is used for communication between master and slave.
All these steps are implemented in just few lines of driver code.