Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Getting started with Arduino – (Part 1/49)

By Ajish Alfred September 27, 2022

Any AVR microcontroller based board which follows the standard arduino schematic and is flashed with the arduino boot-loader can be called an arduino board. The arduino is refered to as open source hardware, since the standard schematic is open to everyone and anybody can make their own version of arduino board following the standard schematic. All arduino boards should be compatible with the arduino IDE which can be used to program the arduino boards. The arduino IDE is also open source and anybody can contribute their libraries to the arduino. There is no other tool available which helps in easy prototyping like the arduino does.  The arduino board has all the required circuitary to get the built-in AVR microcontroller running. The output or inputs can be taken from the boards or given to the board using convenient connectors. Both digital and analog inputs and outputs are available in all arduino boards. The arduino boards can also communicate with other devices using standard communication ports like USART, IIC, and USB etc. The most impressive thing is that most of the arduino boards are bread-board compatible which makes both the hobbyist and developers happy.

When it comes to programming the arduino board anyone who have basic knowledge of c programming can quickly get started with the arduino IDE. It is very simple to understand and has built-in functions for almost every simple or complex task. There are lots of libraries available which can be used to interface the arduino board with any other devices. One can hardly find a hardware module of which the interfacing code is not there in the arduino. Moreover there are lots of examples which can help one to get used with the arduino in a very short time.

This article discusses the steps required for getting started with arduino and explains how to code a simple LED blinking code.


Any AVR microcontroller-based board that follows the standard Arduino schematic and is flashed with the Arduino bootloader can be called an Arduino board. Arduino is referred to as open-source hardware since the standard schematic is open to everyone, and anybody can make their own version of an Arduino board following the standard schematic.

All Arduino boards should be compatible with the Arduino IDE, which can be used to program the Arduino boards. The Arduino IDE is also open-source, and anybody can contribute their libraries to the Arduino. No other tool is available that helps with easy prototyping like Arduino does. Its board has all the required circuitry to get the built-in AVR microcontroller running.

The output or inputs can be taken from the boards or given to the board using convenient connectors. All Arduino boards offer both digital and analog inputs and outputs. They can also communicate with other devices using standard ports like USART, IIC, USB, etc. The most impressive thing about them is that most of the Arduino boards are breadboard-compatible, making both hobbyists and developers happy.

When it comes to programming the Arduino board, anyone with basic knowledge of C programming can get quickly started with the Arduino IDE. It is very simple to understand and has built-in functions for almost every simple or complex task. Additionally, many libraries can be used to interface the Arduino board with any other devices. One can hardly find a hardware module without the interfacing code in the Arduino. There are many examples that can help you get used to using Arduino in a very short time.

This article discusses the steps required to get started with Arduino and explains how to code a simple LED blinking code.

Getting started

First, select the Arduino board that suits your requirements. Visit Arduino’s website to get all the details about the boards and software. Beginners are recommended to use the Arduino Duemilanove board or Arduino Uno board. Those used to handling hardware, soldering, etc., can choose the Arduino Pro-mini board. All details of available Arduino boards can be found on the website.

This article and its ensuing parts will explain the Arduino pro-mini board and the IDE version 1.0.3 for Windows. This board’s advantage is that it comes in a very small size — breadboard-compatible burg stick connectors can be soldered according to our requirements. It is very breadboard-friendly and occupies less space than a typical breadboard.

Typical Arduino Pro-Mini Board.

Figure 1. Typical Arduino Pro-Mini Board.

The only difficulty is that it requires another board to load the program into it through its USB port. The compatible USB to TTL converter board can be obtained from vendors or via online purchase. Together, these two boards cost less than other basic Arduino boards.

Figure 2. External USB to TTL converter board for programming Arduino and serial communication.

Downloading Arduino

The latest version of the Arduino IDE can be downloaded from the Arduino website itself. It is available for Windows, Linux, Mac, etc. Copy the entire folder to a preferred location on your PC, open the folder, click on the Arduino icon, and that’s it—no need to install.

Figure 3. Arduino IDE download from Arduino website.

The programming language is based on C, and anyone with a basic understanding of C should quickly be able to get started with it. If needed, a separate page discusses the details of the Arduino programming language.

If everything has been done correctly, the Arduino IDE will open, and it will look like Figure 4 in Windows.

Figure 4. Arduino IDE software window.

Save the project in a folder selected to contain all projects and experiments with Arduino. Click file, Save As, select the required folder, and give the file a name. It is recommended for all the experiments with Arduino to create a folder named “ARDUINO WORKSPACE” and save this project as “_1_led_blinking.” Sketch names can only consist of ASCII characters and numbers (they cannot start with a number). They should also be less than 64 characters long.

The Arduino sketch is saved in the file format ‘.pde’ (Figure 5).

Figure 5. Saving file name in Arduino.

Coding

Now go to the examples and find the basic LED blinking code, as shown in Figure 6.

Figure 6. LED blinking code from File Menu

Now, in a separate window with the code opened, select all and copy-paste the entire code into the _1_led_blinking window. Close the new window with the ‘blink code’ left unedited (it is not supposed to be edited by the user because it is a working code and should be kept as such for future reference).

All the Arduino codes and hardware connections have a small description. The hardware connections are marked inside the green box shown in Figure 7 at the very beginning of the code file.

Figure 7. Code description and hardware connections.

There is a built-in LED connection to the digital pin number 13 of the Arduino pro-mini board. This code is for blinking that LED with a delay.

An Arduino code has two basic functions, namely “setup ()” and “loop()”. The setup() is the function where all the initial settings, like setting the pin as input/output, initializing the serial communication with the baud rate, etc. The loop() is actually an infinite loop inside which the rest of the code should be written. The user-defined functions, if there are any, should be written separately outside the setup() and loop() and can be called from inside both of them.

The function pinMode() is a built-in function used to set a particular pin as input or output. The first parameter is the pin number, and the second parameter suggests whether the pin should be an input or output.

For example, to make pin number 5 as output:

pinMode (5, OUTPUT);

To make pin number 6 as input:

pinMode(6, INPUT);

In this particular example, the pin13 is already defined as LED using the statement:

int led = 13

Hence came the following statement:

pinMode(led, OUTPUT);

This can make the 13th pin of the Arduino board an output.

The digitalWrite() function is another function that can be used to write a digital value (logic 0 or logic high) to a particular pin that has already been made an output using the pinMode() function.

For example, to make the pin number 5 as logic high:

digitalWrite(5, HIGH);

To make the same pin as logic low:

digitalWrite(5, LOW);

The function delay () is very useful for almost all projects. It can generate a delay in milliseconds between code steps.

For example, to generate a delay of 5 seconds:

delay(5000);

Verifying the code

Once the coding has been done, it’s time to verify it. Arduino is so user-friendly that people usually don’t end up with too many errors. Use the button at the top left corner of the IDE, shown in Figure 8, for verifying the code:

Figure 8. Code verification button — top left Arduino IDE Window.

Uploading to the board

Once the verification has been done, the code is ready to upload to the board. Connect the board to the PC’s USB port and install the driver that comes with it. After installing the driver, come back to the Arduino IDE and select the board from the list using tools>boards>Arduino pro mini (Figure 9).

Figure 9. Select Arduino Pro Mini in the IDE window.

After selecting the board, select the COM port on which it is connected, as shown in Figure 10.

Figure 10. COM4 Port from Tools.

Now, try to upload the code to the board by clicking the upload button shown in Figure 11.

Figure 11. Uploading the code.

Refer to the code and circuit for blinking an external LED connected to pin number 5 of the Arduino board.

You can also try changing the delay or connecting an external LED to another pin and other basic things. No separate power supply is required, as the Arduino pro-mini board is USB-powered.

Conclusion

Arduino offers a simple and accessible platform for both beginners and advanced users. Getting started is easy with its open-source design, extensive libraries, and strong community support. The Arduino Pro Mini, while compact, is powerful and ideal for embedded projects. Users can quickly learn and advance to more complex applications by experimenting with basic projects like LED blinking.

You may also like:


  • Arduino compatible coding 01: Arduino MCU family

  • Arduino compatible coding 02: Getting started with Arduino

  • How to play musical notes on Arduino

  • What are the top tools for developing embedded software?
  • Using Digital Input And Out Of Arduino Using Push Button And LED Circuit Setup On Breadboard
    How To Use Digital Input And Digital Output Of Arduino-…

Project Source Code

###



// Pin 5 has an LED connected on it through 1K resistor.

// give it a name:

int led = 5;

// the setup routine runs once when you press reset:

void setup() {                

  // initialize the digital pin as an output.

  pinMode(led, OUTPUT);     

}

// the loop routine runs over and over again forever:

void loop() {

  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)

  delay(1000);               // wait for a second

  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW

  delay(1000);               // wait for a second

}

###

Circuit Diagrams

Circuit-Diagram-Getting-Started-Arduino

Project Components

  • Arduino Pro Mini
  • LED
  • Resistor

Project Video


Filed Under: Arduino Projects, Electronic Projects
Tagged With: Arduino, led interfacing
 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Voltage mode pushpull is a nonsense SMPS?
  • Input impedance matching network
  • High Side current sensing
  • The comparison of different Tcl script checkers
  • Reducing "shoot-through" in offline Full Bridge SMPS?

RSS Electro-Tech-Online.com Discussions

  • Is AI making embedded software developers more productive?
  • Back to the old BASIC days
  • Parts required for a personal project
  • PIC KIT 3 not able to program dsPIC
  • Failure of polypropylene motor-run capacitors

Featured – RPi Python Programming (27 Part)

  • RPi Python Programming 21: The SIM900A AT commands
  • RPi Python Programming 22: Calls & SMS using a SIM900A GSM-GPRS modem
  • RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi
  • RPi Python Programming 24: I2C explained
  • RPi Python Programming 25 – Synchronous serial communication in Raspberry Pi using I2C protocol
  • RPi Python Programming 26 – Interfacing ADXL345 accelerometer sensor with Raspberry Pi

Recent Articles

  • What is AWS IoT Core and when should you use it?
  • AC-DC power supply extends voltage range to 800 V DC
  • Infineon’s inductive sensor integrates coil system driver, signal conditioning circuits and DSP
  • Arm Cortex-M23 MCU delivers 87.5 µA/MHz active mode
  • STMicroelectronics releases automotive amplifiers with in-play open-load detection

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe