



Take sensor reading every hour and push that data to temperature data array.Following that we initialise server with function it needs to run, once it receives requests from client.Serial interface allows us to know IP address of NodeMcu once it connects to your local wifi network. We also initialise temperature data array to a known value. Initialise serial, sensor and wifi interfaces.

Once done you have all the dependencies taken care of and we are ready for the next step.įollowing is the outline of code that we will be using : Answer is that we will be using wifi capabilities of NodeMcu to connect with your local wifi network and get sensor data through a web page served by NodeMcu on request from your computer/mobile. You might have a question after looking at the component list, ' Where will I be able to see the temperature reading from my temperature sensor?' as we did not include any display component. Next, again go to Sketch -> Include Library -> Manage Libraries, search for 'Adafruit Unified Sensor' and install 'Adafruit Unified Sensor by Adafruit'.Next, go to Sketch -> Include Library -> Manage Libraries, search for 'DHT11' and install 'DHT sensor library by Adafruit'.Following that go to Tools -> Board -> Boards Manager and search for 'esp8266', look for 'esp8266 by esp8266 community' and install it. Open Arduino IDE, go to File -> preferences and paste '' in Additional Boards Manager URLs and click OK.Once IDE is installed, download and install following libraries. Arduino IDE - Use this link to download and install IDE(Interactive Development Environment) on your computer, we will use this IDE to program NodeMcu.Local wifi network - NodeMcu will connect to this network.įollowing is the list of software and libraries you will need :.Breadboard and Jumper wires - You will need either one of them to connect DHT11 sensor with NodeMcu.USB A to micro B cable (optional) - In case your charger does not have one that is detachable, We need this cable to connect NodeMcu with computer.Mobile phone charger - It will act as power supply for NodeMcu once programming is done and we are ready to monitor temperature,.Computer - We will need computer with Arduino IDE installed, to program NodeMcu,.DHT11 sensor - This is a temperature and humidity sensor with not too great accuracy but will work for us,.NodeMcu - This is a microcontroller board with capability to connect with wifi and much more,.Following is the list of electronics components you will need :
