background image

www.joy

-

it.net

 

Pascalstr. 8 47506 Neukirchen

-

Vluyn

 

 

 

2. Installation

 

To use the sensor with the Arduino, you must first download the required 

library 

here

.  Unzip  the  folder  and  save  it  in  your  Libraries  folder.  This 

 

folder is usually located at Documents 

→ 

Arduino 

→ 

Libraries.

 

 

 

3. Code example

 

/***************************************************************************

 

  This is a library for the BMP280 humidity, temperature & pressure sensor

 

 

 

  Designed specifically to work with the Adafruit BMEP280 Breakout 

 

  

----

> http://www.adafruit.com/products/2651

 

 

 

  These sensors use I2C or SPI to communicate, 2 or 4 pins are required 

 

  to interface.

 

 

 

  Adafruit invests time and resources providing this open source code,

 

  please support Adafruit and open

-

source hardware by purchasing products

 

  from Adafruit!

 

 

 

  Written by Limor Fried & Kevin Townsend for Adafruit Industries.  

 

  BSD license, all text above must be included in any redistribution

 

 ***************************************************************************/

 

 

 

#include <Wire.h>

 

#include <SPI.h>

 

#include <Adafruit_BMP280.h>

 

 

 

 

 

#define BMP_SCK 13

 

#define BMP_MISO 12

 

#define BMP_MOSI 11 

 

#define BMP_CS 10

 

 

 

Adafruit_BMP280 bmp; 

// I2C

 

//Adafruit_BMP280 bmp(BMP_CS); // hardware SPI

 

//Adafruit_BMP280 bmp(BMP_CS, BMP_MOSI, BMP_MISO,  BMP_SCK);

 

 

 

void

 

setup

() {

 

  Serial.begin(

9600

);

 

  Serial.println(F("BMP280 test"));

 

   

 

  

if

 (!bmp.begin()) {  

 

    Serial.println(F("Could not find a valid BMP280 sensor, check wiring!"));

 

    

while

 (

1

);

 

  }

 

}

 

Summary of Contents for SEN-KY052

Page 1: ...SURE SENSOR SEN KY052 1 GENERAL INFORMATION Dear customer Thank you very much for choosing our product In the following we will show you what has to be observed during commissioning and use Should you encounter any unexpected problems during use please feel free to contact us ...

Page 2: ...ND pin 6 GND SCL pin 5 SCL SDA pin 3 SDA 1 Connection sudo apt get install git Now you can download the required library for the sensor with the following command git clone https github com adafruit Adafruit_CircuitPython_BMP280 git Now run this command to install the library sudo pip3 install adafruit circuitpython bmp280 You also need this additional library git clone https github com adafruit A...

Page 3: ...3 install adafruit circuitpython lis3dh Then choose P5 I2C Now confirm the question with YES and I2C is activated Now you must restart your Raspberry Pi with this command sudo reboot Now open the configuration of the Raspberry Pi and activate I2C as follows sudo raspi config Now select 5 Interfacing Options ...

Page 4: ...be changed to the current air pressure at your location Otherwise inaccuracies will occur Weather services can give you information 1013 25 hPa is the average air pressure at the sea level sensor sea_level_pressure 1013 25 Output of the measured values print nTemperatur 0 1f C sensor temperature print Luftdruck 0 1f hPa sensor pressure print Höhe 0 2f m sensor altitude Save the code example with t...

Page 5: ... pins are required to interface Adafruit invests time and resources providing this open source code please support Adafruit and open source hardware by purchasing products from Adafruit Written by Limor Fried Kevin Townsend for Adafruit Industries BSD license all text above must be included in any redistribution include Wire h include SPI h include Adafruit_BMP280 h define BMP_SCK 13 define BMP_MI...

Page 6: ...atteries which are not enclosed by the device Return Options As the end user you can hand over your old appliance which has essentially the same functions as the new one bought with us free of charge for disposal with the purchase of a new device Small devices which do not have outer dimensions bigger than 25 cm can be handed in for disposal independently of the purchase of a new product in normal...

Page 7: ...e we are available by email telephone and ticket support system to answer these Email service joy it net Ticket system http support joy it net Telephone 49 0 2845 98469 66 10 17 o clock For further information visit our website www joy it net Published 18 02 2020 www joy it net SIMAC Electronics GmbH Pascalstr 8 47506 Neukirchen Vluyn ...

Reviews: