Consentium IoT
HomeTutorialsMain siteBlog
  • Getting Started
    • Consentium IoT Platform usage
    • Sensor Data API Documentation
    • Steps for Using Consentium IoT's OTA Service
    • Consentium Edge Machine Learning
    • ConsentiumNow Library Documentation
    • EdgeModelKit: Sensor Data Acquisition and Logging Library
  • Code usage
    • ConsentiumThings Python API
    • ConsentiumThings Arduino API
    • ConsentiumThings Arduino API with OTA Updates
    • WiFi auto connect API
    • ConsentiumThings Arduino Data Receiver API
    • ConsentiumNow Library API
  • Edge boards
    • Consentium Edge Dalton board
  • Tutorials
    • Receiving sensor data
      • Receiving Sensor Data from Consentium IoT Cloud and Controlling LED
    • Sending sensor data
      • Sending LM35 Sensor Data to Consentium IoT Cloud
      • Sending DHT11 Sensor Data to Consentium IoT Cloud
    • Edge machine learning
      • Sine wave predictor
      • Sine wave predictor with IoT
      • TinyML Occupancy Classification Example with Consentium IoT
  • Board support
    • Adding NodeMCU support to Arduino IDE
    • Adding ESP32 Support to Arduino IDE
    • Programming Raspberry Pi Pico with Arduino IDE (Pico W Compatible)
Powered by GitBook
On this page
  • Step 1: Connect Your NodeMCU to Your Computer
  • Step 2: Open Arduino IDE
  • Step 3: Make an LED Blink Using NodeMCU

Was this helpful?

  1. Board support

Adding NodeMCU support to Arduino IDE

PreviousTinyML Occupancy Classification Example with Consentium IoTNextAdding ESP32 Support to Arduino IDE

Last updated 9 months ago

Was this helpful?

This guide will help you program the NodeMCU using the Arduino IDE.

Step 1: Connect Your NodeMCU to Your Computer

You need a USB micro B cable to connect the NodeMCU board to your computer. Once connected, a blue LED will start flashing.

If your computer does not detect the NodeMCU board, you may need to download the appropriate driver from the following link:

Step 2: Open Arduino IDE

Ensure you have Arduino IDE version 1.6.4 or later to proceed.

  1. Go to File > Preferences.

  2. In the "Additional Boards Manager URLs" field, type (or copy-paste) the following URL:

    http://arduino.esp8266.com/stable/package_esp8266com_index.json
  3. Click OK.

  4. Now, go to Tools > Board > Board Manager.

  5. In the search field, type "esp8266".

  6. You should see an entry named "esp8266 by ESP8266 Community". Click on it and press the Install button on the lower right.

Once the download is complete, you're ready to start coding!

Step 3: Make an LED Blink Using NodeMCU

For our first program, we will blink an LED connected to one of the digital pins of the NodeMCU board. Note: The pin names printed on the board may differ from the pin names used in the program.

In this example, we'll connect the LED to D7, which corresponds to GPIO13. Below is the code (which is a modified version of the Arduino Blink example):

// The setup function runs once when you press reset or power the board
void setup() {
  // Initialize digital pin 13 (D7) as an output.
  pinMode(13, OUTPUT);
}

// The loop function runs over and over again forever
void loop() {
  digitalWrite(13, HIGH);   // Turn the LED on (HIGH is the voltage level)
  delay(1000);              // Wait for one second
  digitalWrite(13, LOW);    // Turn the LED off by making the voltage LOW
  delay(1000);              // Wait for one second
}

NodeMCU Pin Mapping

  • In this example, D7 (as printed on the board) corresponds to GPIO13 in the code.

Ensure that the LED is connected to the correct pin as per the board's pinout.

USB to UART Bridge VCP Drivers