background image

 

 

 

 

 5 

 

Connection to Arduino® 

 Pin Assignment 

 

 

WPSE342 

Arduino® Uno 

Arduino® Mega 

 

3.3 V 

3.3 V 

3.3 V 

 

GND 

GND 

GND 

 

SDA 

SDA (A4) 

20 

 

SCL 

SCL (A5) 

21 

 

Using the Air Quality Sensor Module 

 

 

We are going to use I²C communication with the BME280 and CSS811 sensor module. 

 

For that, connect the air quality sensor to the Arduino® Uno 

SDA

 and 

SCL

 pins, as shown in 

the following schematic diagram below or check the pin assignment table above. 

 

 

 

 

Содержание WPSE342

Страница 1: ...USER MANUAL EN air quality sensor combo board WPSE342 whadda com ...

Страница 2: ...sons with reduced physical sensory or mental capabilities or lack of experience and knowledge if they have been given supervision or instruction concerning the use of the device in a safe way and understand the hazards involved Children shall not play with the device Cleaning and user maintenance shall not be made by children without supervision General Guidelines Refer to the Velleman Service and...

Страница 3: ...ular CCS811 and BME280 ICs It provides a variety of environmental data including barometric pressure humidity temperature TVOCs and equivalent CO2 or eCO2 levels Communication is possible through the I C protocol The CCS811 is an exceedingly popular sensor providing readings for equivalent CO2 or eCO2 in parts per million ppm and total volatile organic compounds TVOC in the parts per billion ppb T...

Страница 4: ...4 Features CCS811 and BME280 ICs eCO2 sensor TVOC sensor temperature sensor humidity sensor pressure sensor altitude sensor Circuit Diagram ...

Страница 5: ...A SDA A4 20 SCL SCL A5 21 Using the Air Quality Sensor Module We are going to use I C communication with the BME280 and CSS811 sensor module For that connect the air quality sensor to the Arduino Uno SDA and SCL pins as shown in the following schematic diagram below or check the pin assignment table above ...

Страница 6: ...E280 and CCS811 libraries Follow the next steps to install the library in your Arduino IDE Open your Arduino IDE and go to Sketch Include Library Manage Libraries The Library Manager should open Search for Sparkfun bme280 in the search box and install the library Search for Sparkfun CCS811 in the search box and install the library ...

Страница 7: ...metric pressure humidity temperature TVOCs and equivalent CO2 or eCO2 levels 16 Communication is possible through the I C protocol 17 18 The CCS811 is an exceedingly popular sensor providing readings for equivalent CO2 or eCO2 in parts per million PPM 19 and total volatile organic compounds TVOC in the parts per billion PPB 20 The CCS811 also has a feature that allows it to fine tune its readings ...

Страница 8: ...BME280 myBME280 53 54 define CCS811_ADDR 0x5B Default I2C Address 55 define CCS811_ADDR 0x5A Alternate I2C Address 56 57 CCS811 myCCS811 CCS811_ADDR 58 59 60 void setup 61 62 Open serial communications and wait for port to open 63 64 Serial begin 115200 65 66 Serial println Basic Example for reading out data from BME280 and CCS811 sensors 67 68 Wire begin 69 70 if myBME280 beginI2C false Begin com...

Страница 9: ...w Altitude in feets 101 Serial print m 102 103 Serial print Temp 104 Serial print myBME280 readTempF 0 Show temp in Fahrenheit 105 Serial print myBME280 readTempC 0 Show temp in Celsius 106 Serial print C 107 108 Serial println 109 110 111 Check to see if data is ready with dataAvailable 112 if myCCS811 dataAvailable 113 114 If so have the sensor read and calculate the results 115 Get them later 1...

Страница 10: ...y including the required libraries to interface with the onboard sensors of the air quality sensor combo board These are the standard Arduino Wire library using the I C interface the Sparkfun BME280 and Sparkfun CCS811 library include Wire h include SparkFunBME280 h include SparkFunCCS811 h I C We are using the I C interface protocol by default We need to create 2 objects a BME280 object called my...

Страница 11: ... pr inv 0 t cur https www atmos illinois edu weather tree viewer pl launch sfcslp myBME280 setReferencePressure 101500 Adjust the sea level pressure used for altitude calculations Initializing the Sensors BME280 if myBME280 beginI2C false Begin communication over I2C Serial println BME280 sensor did not respond Please check wiring Freezing while 1 Freeze CCS811 if myCCS811 begin false Serial print...

Страница 12: ... myBME280 readFloatHumidity myBME280 readFloatPressure myBME280 readFloatAltitudeMeters myBME280 readFloatAltitudeFeet myBME280 readTempF Show temp in Fahrenheit myBME280 readTempC Sowh temp in Celsius CCS811 myCCS811 getCO2 myCCS811 getTVOC ...

Страница 13: ...13 whadda com Modifications and typographical errors reserved Velleman Group nv WPSE342_v01 Velleman Group nv Legen Heirweg 33 9890 Gavere ...

Отзывы: