EasyManua.ls Logo

Seeed Grove Beginner Kit - Page 54

Seeed Grove Beginner Kit
71 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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®

Other manuals for Seeed Grove Beginner Kit

Related product manuals