Easy IoT Weather Station With Multiple Sensors (enchanced 1)


1,658

12

3

This Instructable is only about adjustment necessary on source code of original Instructables, while I had problems to get it running. The main problem - I did not have all but only DHT11 sensor attached, the setup() was failing while other sensors were not found.

The hardware part is exact same as on original. I connected only termo/humid DHT11 sensor.

I had to make some adjustments to the Arduino sketch code (see next steps)

Also I tested 2 boards and everything worked the same (see images of the ESP boards):
a) ESP12E DEVKIT V2 (www.doit.am) (baud rate 115200)

b) NodeMCU AMICA www.nodemcu.com (baud rate 115200, despite on board written "use 9600")

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Arduino Configuration and Adjustments

1. downloading in Arduino IDE the board need to search for "NodeMCU" that download huge package. Select "NodeMCU V0.9" board for compilation, the same did worked well also when board "NodeMCU V1.0" was selected.

2. module ESP8622WiFi is not downloaded automatically with the boards. I downloaded it myself and to put into library/ESP8622WiFi (found here www.nodemcu.com and read READ.ME file inside)

3. need to download separately other sensor libraries:

for Adafruit_Sensor - library Adafruit Sensor Unified

for Adafruit_BMP085 - same library name

4. I've connected only DHT11 sensor, so when started, the reading of next sensor just reseted the board. Solution - I wrote a lot of #ifdef for all sensors and than it worked. Final source code is attached

Step 2: Arduino Enchanced Script

The original script Weather_station_for_instructables.ino needed multiple #ifdef so I stored a final one here

Be the First to Share

    Recommendations

    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    3 Discussions

    None
    JohnL183

    2 years ago

    Has anyone connected this to a WeatherUnderground account?

    None
    NikushaC

    2 years ago

    Thanks a lot for your adjustments! Finally, after many hours of searching for solution, your sketch saved my project ;)

    None
    seamster

    3 years ago

    Nice, thank you for sharing your adjustments.