MS5837 Sensor Sample

Overview

This sample application retrieves the pressure and temperature from a MS5837 sensor every 10 seconds, and prints this information to the UART console.

Requirements

Wiring

The nrf52840 Preview development kit should be connected as follows to the MS5837 sensor.

nrf52840
Pin
MS5837
Pin
P0.3 SCL
P0.31 SDA

Building and Running

Build this sample using the following commands:

# On Linux/macOS
cd $ZEPHYR_BASE/samples/sensor/ms5837
mkdir build && cd build
# On Windows
cd %ZEPHYR_BASE%\samples\sensor\ms5837
mkdir build & cd build
cmake -GNinja -DBOARD=nrf52840_pca10056 ..
ninja

See nRF52840-PCA10056 on how to flash the build.