ArduinoUNO PDF
ArduinoUNO PDF
ArduinoUNO PDF
Arduino IDE
The Arduino IDE is an open-source software, which is used to write and
upload code to the Arduino boards. The IDE application is suitable for different
operating systems such as Windows, Mac OS X, and Linux. It supports the
programming languages C and C++. Here, IDE stands for Integrated Development
Environment.
The program or code written in the Arduino IDE is often called as sketching.
We need to connect the Genuino and Arduino board with the IDE to upload the sketch
written in the Arduino IDE software. The sketch is saved with the extension '.ino.'
Installation steps for Arduino IDE
Here are the steps to install the Arduino IDE on your computer:
1. Go to the official Arduino website at https://www.arduino.cc/en/software.
Click on the download link for your operating system (Windows, Mac, or
Linux).
2. Once the download is complete, run the installer file. Follow the prompts to
complete the installation.
4. Result
Node MCU
NodeMCU is an open-source firmware and development kit that is based on
the ESP8266 WiFi module, which is widely used in IoT projects due to its easy
programming and low cost.
1. Install the current upstream Arduino IDE at the 1.8.9 level or later. The current
version is on the Arduino website.
2. Start the Arduino IDE and open the Preferences window.
3. Enter https://arduino.esp8266.com/stable/package_esp8266com_index.json
into the File >>Preferences >>Additional Boards
4. Open Boards Manager from Tools >> Board menu and install esp8266
platform (and don't forget to select your ESP8266 board from Tools >> Board
menu after installation).
5. Go to Tools >> Board >> esp8266 >> select NodeMCU 1.0 (ESP-12E Module)
4. Results
Code
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}
//The above code remains the same for both Arduino Uno and Node MCU
Code explanation
1. void setup(): This is a special function that is called once when the Arduino
board is powered on or reset. It is used to initialize the board and the
connected devices.
2. pinMode(LED_BUILTIN, OUTPUT): This line sets the mode of the built-in
LED pin to OUTPUT. The LED_BUILTIN constant is defined by the Arduino
IDE and refers to the pin number of the built-in LED on the board.
3. void loop(): This is a special function that is called repeatedly while the
Arduino board is powered on. It is used to define the main program logic.
4. digitalWrite(LED_BUILTIN, HIGH): This line sets the LED_BUILTIN pin
to HIGH, which turns on the built-in LED.
5. delay(1000): This line causes the program to pause for 1000 milliseconds, or 1
second.
6. digitalWrite(LED_BUILTIN, LOW): This line sets the LED_BUILTIN pin
to LOW, which turns off the built-in LED.
Steps 4 to 6 are repeated indefinitely by the loop() function, causing the built-in LED
to blink on and off at a regular interval of 1 second.