


| รหัสสินค้า | AS00448 |
| หมวดหมู่ | วัดสภาพแวดล้อมและแก๊ส Environmental / Gas |
| ราคา | 4,995.00 บาท |
| สถานะสินค้า | พร้อมส่ง |
| จำนวน | ชิ้น |
/* Blue Robotics MS5837 Library Example
-----------------------------------------------------
Title: Blue Robotics MS5837 Library Example
Description: This example demonstrates the MS5837 Library with a connected
sensor. The example reads the sensor and prints the resulting values
to the serial terminal.
The code is designed for the Arduino Uno board and can be compiled and
uploaded via the Arduino 1.0+ software.
-------------------------------
The MIT License (MIT)
Copyright (c) 2015 Blue Robotics Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-------------------------------*/
#include <Wire.h>
#include "MS5837.h"
MS5837 sensor;
void setup() {
Serial.begin(9600);
Serial.println("Starting");
Wire.begin();
// Initialize pressure sensor
// Returns true if initialization was successful
// We can't continue with the rest of the program unless we can initialize the sensor
while (!sensor.init()) {
Serial.println("Init failed!");
Serial.println("Are SDA/SCL connected correctly?");
Serial.println("Blue Robotics Bar30: White=SDA, Green=SCL");
Serial.println("\n\n\n");
delay(5000);
}
// .init sets the sensor model for us but we can override it if required.
// Uncomment the next line to force the sensor model to the MS5837_30BA.
//sensor.setModel(MS5837::MS5837_30BA);
sensor.setFluidDensity(997); // kg/m^3 (freshwater, 1029 for seawater)
}
void loop() {
// Update pressure and temperature readings
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);
}


ชำระเงินค่าสินค้าโดยการโอนเงินเข้าบัญชีธนาคาร KBANK, SCB, BBL,TMB
กรุณาเก็บหลักฐานการโอนเงินของท่านไว้เพื่อแจ้งการชำระเงินด้วยค่ะ
ท่านสามารถแจ้งการชำระเงินผ่านระบบอัตโนมัติได้โดย Click Link ข้างล่างค่ะ
https://www.arduitronics.com/informpayment
| หน้าที่เข้าชม | 15,449,584 ครั้ง |
| ผู้ชมทั้งหมด | 5,952,662 ครั้ง |
| เปิดร้าน | 21 พ.ค. 2556 |
| ร้านค้าอัพเดท | 26 ต.ค. 2568 |