5.6 Uploading of Code
1. To upload the code in Node MCU firstly, connect the Node MCU with your Laptop or PC via Micro USB cable as shown below:
2. Now, select Node MCU board in Arduino IDE: Go to tools <Board<ESP8266 boards< Node MCU 1.0(ESP 12E module).
Note: If Node MCU board is not visible then refer Lesson-2.
3. Then, again go to tools and select the Port as shown below:
Note : If the port is not coming,then check if the driver is installed in your PC or not.
4.Now, click the upload button and when the uploading will be finished then you will see uploading finished written below.
Then, you will see the LED will glow for 2 seconds and turn off for 1 second as mentioned in code.
5. Once code is uploaded, open serial monitor to see whether wifi is connected or not. Make sure the baud rate should be 115200. If wifi is connected then you can see the air quality level displayed in percentage and data will be sent to thingspeak.
6. Open thingspeak channel and select pubic/private view. Here you can see the data uploaded after the interval of 15 seconds.