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:

Using west:

west build -b nrf52840_pca10056 samples/sensor/ms5837

Using CMake and ninja:

cmake -B build -GNinja -DBOARD=nrf52840_pca10056 samples/sensor/ms5837
ninja -C build

See nRF52840-PCA10056 on how to flash the build.