This example shows how to use the on-board barometer sensor (MS5540B) of the AT91SAM7L-EK to retrieve temperature and pressure information.
An AT91SAM7L-EK evaluation kit is required to use this project.
The application connects to the external MS5540B barometer sensor through the SPI to fetch the current temperature and pressure. This information is then displayed on the DBGU.
Since the usual point for pressure is taken at sea level, the measurement obtained from the sensor must be normalized. The algorithm to apply is described in the following application note from the manufacturer (Intersema).
The current altitude is fixed during compilation, but can be modified by changing the appropriate
#define in main.c.
-- Basic Barometer Project 1.0 --
Current altitude is 205m
Temperature = 26.4 C | Pressure at sea level = 1026.9 mbar