Code Analysis
#include <Wire.h>
#include is an instruction that introduces a header file. Here we use the <Wire.h> library, this
library is included in Arduino IDE.
#include "Seeed_BMP280.h"
Represents the Seeed_BMP280.h header file that introduces the current path.
if
(!bmp280.init()) {
Serial.println(
"Device not connected or broken!"
);
}
Description:
Initialize the air pressure sensor.
Syntax:
bmp280.init()
if the Air pressure sensor did not start properly, then prints out an error to the serial monitor.
Serial.print(bmp280.getTemperature());
Description:
Functions to be used to read temperature value from the sensor.
Syntax:
bmp280.getTemperature(). Return type: float
Prints the temperature data to the serial monitor.
Serial.print(pressure = bmp280.getPressure());
Description:
Functions to be used to read air pressure value from the sensor.
Syntax:
bmp280.getPressure(). Return type: float
53
Grove Beginner Kit For Arduino
®
Содержание Grove Beginner Kit
Страница 1: ...Grove Beginner Kit For Arduino User Manual ...
Страница 63: ...62 Grove Beginner Kit For Arduino ...