Question
#include #include MS5837.h MS5837 sensor; void setup() { Serial.begin(9600); Serial.println(Starting); Wire.begin(); sensor.setModel(MS5837::MS5837_02BA); sensor.init(); sensor.setFluidDensity(997); // kg/m^3 (997 freshwater, 1029 for seawater) } void loop() {
#include
#include "MS5837.h"
MS5837 sensor;
void setup() {
Serial.begin(9600);
Serial.println("Starting");
Wire.begin();
sensor.setModel(MS5837::MS5837_02BA);
sensor.init();
sensor.setFluidDensity(997); // kg/m^3 (997 freshwater, 1029 for seawater)
}
void loop() {
sensor.read();
Serial.print("Pressure: ");
Serial.print(sensor.pressure());
Serial.println(" mbar");
Serial.print("Temperature: ");
Serial.print(sensor.temperature());
Serial.println(" deg C");
Serial.print("Depth: ");
Serial.print(sensor.depth());
Serial.println(" m");
Serial.print("Altitude: ");
Serial.print(sensor.altitude());
Serial.println(" m above mean sea level");
delay(1000);
}
for ardunio code.
need help for changing this code, i want to run this code 50 times in 1 minute per hour. and the system will repeat getting data every hour. after the system run 1 min, it`s sleep 59 minutes, just keep running and running. thank you
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started