WWW.SEEEDSTUDIO.COM
Tech Support: info@seeedi.com
• The HP03M library provides two high level interfaces init() and read().
• There exist a pre-instantiated object Hp03m which is used to access the above
two interfaces.
• The result of read() is available in Temperature, Pressure and Altitude
attributes(variables) provided by HP03M library. The raw uncompensated
pressure and temperature values are available in D1 and D2 variables.
init():
The init() interface initializes the I²C communication.
• Configures Seeeduino PD4 as output
• XCLR (i.e PD4) is pulled LOW to read calibration data.
• Reads calibration data.
read():
• XCLR (i.e PD4) is pulled HIGH to read ADC data.
• The raw temperature and pressure are read from ADC.
• XCLR (i.e PD4) is reset to LOW (to reset the sensor)
• The real temperature and pressure are calculated by compensating with the
coefficient data read during init() phase.
• Altitude is calculated from the measured pressure.
• The results are stored in Temperature, Pressure and Altitude
variables.
The following two functions are used by the above read() function internally:
realTemperaturePressureCalculate():
• Calculate real temperature and pressure from raw value available in Hp03m.D1
& Hp03m.D2
altitudeCalculate():
• Calculate altitude from real atmospheric atmospheric pressure
Temperature:
• The real temperature in °C is available as float.
Pressure
• The real air pressure in hP is available as float.
6
Seeeduino Film Motion Frame