Digital outputs of an arduino what arehe, what arey for and how many does a board contain?

The Arduino platform has become the right hand of most electronics and programmers when they want to develop different types of projects that allow doing some work in the real world. This is how this platform allows you to control any variable, process and phenomenon in the world, which means that it offers a large number of possibilities when working there.

In order to get the most out of this electronic program, it is essential to be able to know its operation, for this we must know that it has 14 digital ports that can function as inputs or outputs, in this case the digital outputs are those that allow actions to be taken on the real world.

Taking into account that this component is essential for the development of the platform and to achieve the desired results in each of the projects worked there . Here we are going to show you what the digital outputs are , what they are for and how many of them each board contains, for this follow in detail everything that we are going to teach you next in the post.

What are the digital outputs of an Arduino and what are they for?

Before going directly into the concept of Arduino digital outputs, it is important to remember that a digital output is a binary signal, this means that it can vary only by two values, this is generally called – Vcc and + Vcc. With this clear, it can be said that digital outputs are those that allow a device to vary its voltage to one of these two values ​​through programming, therefore, they allow various actions to be carried out with the environment.

In the case of Arduino, in general, the voltages are –Vcc and + Vcc, these correspond to the values ​​of 0V and 5V, but keep in mind that some Arduino models work with 3.3V instead of 5V . These types of cases can be seen in Mini, Nano and boards that are based on ARM processors like Arduino Due .

As mentioned at the beginning of the post, all Arduino digital pins can work as digital outputs or inputs, in the case of outputs it is called I / O, Input and Output . It should be noted that the exact output number will depend on the model of the plate being used, so this is not a fixed number. Finally, it should be noted that digital outputs are responsible for allowing electronic projects to carry out work in the physical world.

How many digital outputs does an Arduino have, and what is each one for?

Keep in mind that the exact number of digital outputs of a board will depend mainly on the model of the board, in this case we are going to show you how many digital pins the different board models that you can currently find on the market have.

In the case of Arduino Uno you can find 14 digital pins that can act as digital inputs / outputs, where six of them can be used as PWM (pulse width modulation) outputs while another six as analog inputs. In this case the digital ports of the Arduino UNO go from PIN 0 to PIN 13 as shown in the following image.

If you want to use pins 0 and 1 as digital outputs or input it is important that you disconnect the circuit with which you are doing the program at that moment, since both pins are also used for communication with the computer, so it must be disconnected the circuit for which it can be programmed.

For the Arduino nado board there are 14 pins that can be used as digital outputs, for the Arduino Mini there are 20 pins and for the Mega model it can have up to a total of 70 digital outputs.

Finally, keep in mind that the output pins have been created to deliver voltage signals, not to supply current to a circuit. This means that the maximum current that a digital pin can supply is 40mA, enough to light an LED, so it will not be enough for something more advanced. In this way, the loads to be handled should not exceed 5V or consume more than 40mA .

What are the Arduino boards with more digital outputs that we can buy?

Currently there are many models of Arduino boards available around the world, each of them offers different characteristics so you can choose those that best suit your needs . In this case we are going to show you those boards with more digital outputs that you can buy on the market.

To do this, follow the list that we will show you below:

  • Arduino Leonardo: This type of board is recognized in the computer as a keyboard or mouse device and it has 20 digital pins that can act as input or output.
  • Arduino UNO R3 : Considered today as one of the best options when starting programming and electronics with In this case it is a robust board ideal for taking the first steps in programming, it has a total of 14 digital pins .
  • Arduino 101: Its main advantage is ease of use, which combines it with new technologies, this is how this board has the ability to recognize gestures thanks to the 6-axis accelerometer and gyroscope that is built into there. It also offers the possibility of managing the board from the smartphone via Bluetooth 4.0 . finally this board offers 14 digital pins in your system.
  • Arduino Micro : It is considered one of the smallest boards, but which is perfect to turn any type of object into an intelligent object, it makes use of 20 digital outputs .
  • Arduino Nano: This board is quite similar to the Arduino Uno, but this one is much smaller in size, as it is much smaller, it does not have a power supply connector , this is how it has replaced the standard USB connection a micro-USB connector . It has a total of 14 digital pins .
  • Arduino Mega: This is a board that has been created to carry out complex projects, this is how it has 70 digital inputs / outputs . It is much larger than most boards, this has been done so that the connections are much easier to make . The possibilities you have with this board are practically endless.
  • Arduino Due : This is another of the boards with more output pins available, it has a total of 54 input / output pins and 12 analog inputs. Like Mega, it is a board developed to carry out complex projects and is based on a microcontroller with a 32-bit ARM core .
  • Arduino MKR Zero: It is characterized by having an SD connector integrated into the circuit itself that will allow you to play music without the need to install extra hardware . As mentioned earlier in the post, this model works with 3.3V instead of 5V. It has a small size that makes it ideal to be integrated into any object that you want to work intelligently and has a total of 22 output pins .
  • Arduino YÚN : It has a total of 20 input / output pins and is an ideal pack to carry connected device projects, such as Internet of Things (IoT) projects .

Learn step by step how to use an Arduino digital output for your projects

Being able to use an Arduino digital output for your projects is very easy, so you don’t need to be an expert on these platforms to achieve it.

In order to carry out the process of programming an output pin, it must be done from the “Void Setup” function and for this the following instruction will be used:

  • pinMODE (PIN Digital, OutPut).

In the Digital Pin space it must be replaced by the Arduino pin that you want to configure as an output.

In this case you want to configure Pin 5 as the output pin of the board, then for this it will be necessary to access the Void Setup and there use the PinMODE instruction as follows:

void setup () {

pinMode (5, OUTPUT); // Set PIN 5 as DIGITAL OUTPUT}

There is also another way to program the digital output of the panel, for this you must declare a name for the PIN, in this case PIN 5, keep in mind that you can call it at the PIN you choose with the name you want.

This will also be done from void setup as follows:

Terminal_5 byte = 5; // Baptized PIN 5 with the name "Terminal_5"

void setup () {

pinMode (Terminal_5, OUTPUT); // Set PIN 5 as OUTPUT

As you can see, before SETUP, a variable of the type “Byte” has been declared in the declarations area, which is baptized as “Terminal_5” and has been assigned the value of 5, in this way that name can be used in any part of the program where you need to do something with the PIN 5 .

It is also possible that you get with “int” instead of “Byte” either variable works. However, when it comes to naming pins it is better to use Byte since it is capable of storing integer values ​​ranging from 0 to 255 .

Using the digital outputs on Arduino

When you have already configured the pins that you want to use as output, then the next thing to do is use the outputs, for this it is necessary to use a second function, which must be called within “Void loop”.

To do this you must do the following:

void loop () {

digitalWrite (Output Pin, HIGH); // Energize the DIGITAL OUTPUT (5v)

digitalWrite (Output Pin, LOW); // De-energize the DIGITAL OUTPUT (0v)}

In this case, the output Pin variable must be replaced by the Arduino pin that you want to energize or de-energize . For this to be better understood, you must write to the digital output if you want it to turn on or off. Suppose you want to activate the Arduino’s digital output on Pin 5 with which you have been working.

For this, it is necessary to make use of the digitalWrite instruction within the Void loop using any of the following ways:

void loop () {

digitalWrite (5, HIGH); // Activate or Energize PIN 5


Terminal_5 byte = 5; // I baptize PIN 5 with the name "Terminal_5"

void loop () {

digitalWrite (Terminal_5, HIGH); // Activate or Energize PIN 5


Terminal_5 byte = 5; // I baptize PIN 5 with the name "Terminal_5"

void loop () {

digitalWrite (Terminal_5,1); // Activate or Energize PIN 5


void loop () {

digitalWrite (5,1); // Activate or Energize PIN 5


As you can see, you can use the 5 inside the function or you can also baptize the Pin and not use it, you can also see that the term HIGH which means to activate Arduino digital output, can be replaced by the number 1 that will indicate exactly the same.

Now if what you want is to deactivate PIN 5, then the procedure to be carried out is exactly the same as mentioned above, but now instead of placing HIGH you must place LOW and if you want you can replace it with the number 0 which means what Same, this will allow you to disable the board’s digital output .

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button