效果图
应该是国产盗版,正版应该是 https://www.adafruit.com/product/2652
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 #include <Arduino.h> #include <Wire.h> #include <SPI.h> #include <Adafruit_Sensor.h> #include "Adafruit_BMP280.h" Adafruit_BMP280 bme; void setup () { Serial.begin (115200 ); unsigned status; status = bme.begin (); if (!status) { Serial.println ("Could not find a valid BMP280 sensor, check wiring!" ); while (1 ) delay (10 ); } } void loop () { Serial.print ("温度 = " ); Serial.print (bme.readTemperature ()); Serial.println (" C" ); Serial.print ("气压 = " ); Serial.print (bme.readPressure ()); Serial.println (" Pa" ); Serial.println (); delay (2000 ); }
GY-BMP280-3.3 高精度大气压强传感器模块 高度计传感器模块大气.zip