background image

out these tutorials before continuing.

Hardware Overview

The ESP32 Environment Sensor Shield incorporates three sensors capable 
of measuring five different environmental variables. It also provides 
connections for several other sensors that can be connected if so desired.

Onboard Sensors

All of the onboard sensors are connected to the ESP32 via I C connection.

Pressure, Humidity, and Temperature

The first onboard sensor is a Bosch BME280. This sensor measures 
relative humidity, temperature, and barometric pressure. On the back side 
of the board is a solder jumper (labeled JP1) which can be closed to 
change the I C address of the chip. By default the address is 0x77; closing 
the jumper forces the address to 0x76.

How to Solder: Through-

Hole Soldering

This tutorial covers everything you 
need to know about through-hole 
soldering. 

Analog to Digital Conversion

The world is analog. Use analog to 
digital conversion to help digital 
devices interpret the world. 

I2C

An introduction to I2C, one of the 
main embedded communications 
protocols in use today. 

2

2

Page 4 of 20

Содержание DEV-14153

Страница 1: ...ng board to interface with this shield Other microcontroller boards will work but since the shield is designed to stack on the ESP32 Thing interfacing with them will be difficult You ll also need some...

Страница 2: ...or which you ll need two three position 3 5mm screw terminals and enough wire to connect the sensor to the board SparkFun ESP32 Thing DEV 13907 Break Away Headers Straight PRT 00116 Female Headers PRT...

Страница 3: ...y to keep around Suggested Reading If you have not yet used the ESP32 Thing Development Board check out this guide first If you aren t familiar with the following concepts we recommend checking Solder...

Страница 4: ...h BME280 This sensor measures relative humidity temperature and barometric pressure On the back side of the board is a solder jumper labeled JP1 which can be closed to change the I C address of the ch...

Страница 5: ...A and by default it will be 0x5B Luminosity The last onboard sensor is the Broadcom APDS 9301 It s capable of detecting and reading light levels from nighttime through broad daylight Keep in mind that...

Страница 6: ...t add an external NTC thermistor for the CCS811 to work properly JP5 Cut the traces on this jumper to disable the pull up resistors for the I2C bus Optional off board Sensors There are connections for...

Страница 7: ...ch like the wind speed gauge the rainfall gauge generates ticks to tally the amount of rain that has fallen Count ticks to determine how much rain has fallen recently Each tick represents 0 011 0 28mm...

Страница 8: ...boards Here we ll show you a bomb proof method to solder down the headers and making sure that they re true and square so it s easier to connect and disconnect the two boards Trim the Headers When yo...

Страница 9: ...ly you may take a file piece of sandpaper or some other sanding grinding tool to sand down the end of the header so that it s smoother You can do both pieces at the same time by holding them together...

Страница 10: ...here If you re new to soldering you may want to solder just the first and last position on each side then pull the board free of the breadboard to avoid heat damage to your breadboard You may find it...

Страница 11: ...side of the shield should be facing the non component side of the ESP32 Thing Double check that the pin labels on the shield match those on the ESP32 Thing Failure to observe these facing rules will m...

Страница 12: ...lation guide If you have not already make sure to setup your own weather station with Wunderground You will need to fill out a form and pick a username password in order to receive a station ID Sensor...

Страница 13: ...efine NO_RAIN_SAMPLES 2000 volatile long rainTickList NO_RAIN_SAMPLES volatile int rainTickIndex 0 volatile int rainTicks 0 int rainLastDay 0 int rainLastHour 0 int rainLastHourStart 0 int rainLastDay...

Страница 14: ...CAddress 0x77 bme settings runMode 3 bme settings tStandby 0 bme settings filter 0 bme settings tempOverSample 1 bme settings pressOverSample 1 bme settings humidOverSample 1 bme begin CCS811 sensor s...

Страница 15: ...Serial print nTimestamp Serial println secsClock Windspeed calculation in mph timeSinceLastTick gets u pdated by an interrupt when ticks come in from the wind speed senso r if timeSinceLastTick 0 wind...

Страница 16: ...any captured rain sensor ticks if rainTicks 0 Start at the end of the list rainTickIndex will alwa ys be one greater than the number of captured samples int i rainTickIndex 1 Iterate over the list an...

Страница 17: ...Underground If the connection fail s return from loop and start over again if client connect host httpPort Serial println Connection failed return else Serial println Connection succeeded Issue the G...

Страница 18: ...r 202 5 else if vin 300 windDir 180 else if vin 400 windDir 247 5 else if vin 600 windDir 225 else if vin 900 windDir 292 5 else if vin 1100 windDir 270 else if vin 1500 windDir 112 5 else if vin 1700...

Страница 19: ...on succeeded shows that a successful connection has been made to the Weather Underground server If your internet connection is down this will fail The second is the one lone line that says success Thi...

Страница 20: ...TMP006 sensor HTU21D Humidity Sensor Hookup Guide The HTU21D humidity sensor is an easy to use digital low cost humidity sensor TMP102 Digital Temperature Sensor Hookup Guide How to connect and use t...

Отзывы: