Product Specifications
Installation
Step1:LubricatingtheOring
UseasmallamountofsiliconegreaseontheOringforlubricationandplaceitinthegrooveoftheBar30PressureSensor.
Step2:Installation
InstalltheBar30PressureSensorintoanendcapandtightenbyhandorwithawrench.
ExampleCode
Arduino
ThisexampleusestheBlueRoboticsMS5837Librarywiththeconnectedsensor.Theexamplereadsthesensorandprintstheresulting
valuestotheserialterminal.
Pleaseremembertousealogiclevelconverter,suchasthisone,toconvertArduino5Vlevelsto3.3V!
Ifyou’veneverusedArduinobefore,wesuggestcheckingoutsometutorials!
YoucanfindtheMS5837LibraryonourGitHubpage.
#include<Wire.h>
#include"MS5837.h"
MS5837sensor;
voidsetup(){
Serial.begin(9600);
Serial.println("Starting");
Wire.begin();
sensor.init();
sensor.setFluidDensity(997);//kg/m^3(997freshwater,1029forseawater)
}
voidloop(){
sensor.read();
Serial.print("Pressure:");
Serial.print(sensor.pressure());
Serial.println("mbar");
Serial.print("Temperature:");
Serial.print(sensor.temperature());
Serial.println("degC");
Serial.print("Depth:");
Serial.print(sensor.depth());
Serial.println("m");
Serial.print("Altitude:");
Serial.print(sensor.altitude());
Serial.println("mabovemeansealevel");