sparkfun DEV-14153 Скачать руководство пользователя страница 19

The first few lines are just diagnostics from the ESP32, and will be present 
at boot time regardless of the application being run. Immediately below the 
line “Connecting to sparkfun-guest” you see a series of dots. One dot 
appears every half second while the connection is pending, so you can see 
from this example that it took approximately 3 seconds for the WiFi to come 
online. After that, the various environmental parameters we’re looking at 
are printed out, along with a timestamp in seconds since the platform was 
booted.

Once a minute, the stream of data from the sensors is interrupted by a 
connection to the weatherunderground.com servers. Here’s what that 
output looks like:

There are two useful pieces of data here. The first, where it says 
“Connection 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”. This is the response 
from the server after your attempt to post data to it. If this fails, it means that 
you connected to the server, but the string you formatted to send to the 
server isn’t formatted properly. This shouldn’t be a problem unless you 
change the example code.

Resources and Going Further

For more information, check out the resources below:

• GitHub Repository: ESP32 Environment Sensor Shield - Design files 

and examples.

• CCS811 library - Arduino library for the air quality sensor on the 

board.

• BME280 library - Arduino library for the temperature and pressure 

sensor on the board.

• APDS-9301 library - Arduino library for the light sensor on the board.
• CCS811 Breakout Hookup Guide - For more information on the 

CCS811, check out this tutorial.

Page 19 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...

Отзывы: