

- #Nodemcu projects for beginners install#
- #Nodemcu projects for beginners serial#
- #Nodemcu projects for beginners code#
- #Nodemcu projects for beginners password#
- #Nodemcu projects for beginners free#
Then connect to the ThingSpeak platform using saved credentials.
#Nodemcu projects for beginners serial#
Check for the successful network connection using WiFi.status() and after a successful connection, print a message on Serial Monitor with the local IP address.
#Nodemcu projects for beginners password#
Then, to connect NodeMCU to the internet, call WiFi.begin and pass network SSID and password as its arguments. Then, the variables for timing purposes are defined.

Make sure, you have edited your credentials in place of these variables. Then the ThingSpeak account credentials such as the channel number and write API are defined, which were recorded earlier. SSID and password are defined, which are required to connect the NodeMCU with the internet. Next, define the pins which are used for the ultrasonic sensors and LEDs.
#Nodemcu projects for beginners install#
#Nodemcu projects for beginners code#
Start the code by including all the required library files in the code like ESP8266WiFi.h for ESP8266 board, etc.

The stepwise explanation of the complete code is given below. Now you can program NodeMCU with Arduino IDE.Īfter the above setup for programming NodeMCU using Arduino IDE, upload the complete code into ESP8266 NodeMCU. After installation is complete, go to Tools ->Board -> and select NodeMCU 1.0(ESP-12E Module). In the Boards Manager window, Type ESP 8266 in the search box, select the latest version of the board, and click on install.Ĥ. Now go to Tools > Board > Boards Manager. Type in the ‘Additional Board Manager URL’ field and click ‘Ok’.ģ. Open Arduino IDE, then go to File–>Preferences–>Settings.Ģ. To upload code into NodeMCU using Arduino IDE, follow the steps below:ġ. Select appropriate field names for each widget.Īfter the successful completion of the hardware setup, now it’s time for programming the ESP8266 NodeMCU. In my case, I have taken an Indicator for the flood.
#Nodemcu projects for beginners free#
We also used ThingSpeak to build many IoT based projects.įirst, go to and create a new free Mathworks account if you don’t have a Mathworks account before. Here we are using ThingSpeak to store the data, which is a very popular IoT cloud platform used to build the store, monitor, and process data online. Setup ThingSpeak account for Flood Monitoring and Alerting SystemĪfter successful completion of hardware as per the above circuit diagram, now its time to setup the IoT platform, where the data can be stored to monitor online. Learn more about the ultrasonic sensor by going through its previous projects like IoT Inventory management and Wi-Fi controlled robot.Ĭircuit diagram for flood monitoring system is given below If it receives them, then it produces an output pulse whose time period can be used to determine the distance from the object. Among them, one acts as a transmitter which converts the electrical pulse of microcontroller into ultrasonic sound pulse and the receiver receives for the transmitted pulses. Ultrasonic distance sensor consists of two ultrasonic transducers. Distance= (Time x Speed of Sound in Air (340 m/s))/2 By using the time required for the echo to reach the receiver, we can calculate the distance to an object we are targeting. When this ultrasound hits the object, it reflects as echo which is sensed by the receiver. An ultrasonic sensor generates high-frequency sound waves. The ultrasonic sensor works on the principle of ultrasound waves which is used to determine the distance to an object. Here, a red LED is used to alert during the critical flood conditions, and the Green LED is used to indicate the normal condition. The data output from the ultrasonic sensor is fed to the NodeMCU, where it is processed and sent to ThingSpeak for Graphical monitoring and Critical alert.

Here, the ultrasonic sensor is used to sense the water level of the river. The above block diagram shows the working of this IoT based flood monitoring system. We previously used ESP8266 NodeMCU to build many IoT projects.
