|
|
@@ -44,18 +44,23 @@ void setup()
|
|
|
void loop()
|
|
|
{
|
|
|
float pressure;
|
|
|
-
|
|
|
+
|
|
|
+ //get and print temperatures
|
|
|
Serial.print("Temp: ");
|
|
|
Serial.print(bmp280.getTemperature());
|
|
|
- Serial.println("C");
|
|
|
-
|
|
|
+ Serial.println("C"); // The unit for Celsius because original arduino don't support speical symbols
|
|
|
+
|
|
|
+ //get and print atmospheric pressure data
|
|
|
Serial.print("Pressure: ");
|
|
|
Serial.print(pressure = bmp280.getPressure());
|
|
|
Serial.println("Pa");
|
|
|
-
|
|
|
+
|
|
|
+ //get and print altitude data
|
|
|
Serial.print("Altitude: ");
|
|
|
Serial.print(bmp280.calcAltitude(pressure));
|
|
|
Serial.println("m");
|
|
|
+
|
|
|
+ Serial.println("\n");//add a line between output of different times.
|
|
|
|
|
|
delay(1000);
|
|
|
}
|