Arduino Digital Outputs  What are they? + How They Work ▷ 2020

The Arduino platform has become the right hand of most electronics and programmers when wanting to develop different types of projects that allow doing some work in the real world. This is how this platform allows control any variable, process and phenomenon in the world, which means that it offers a lot 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 work as inputs or outputs, in this case the digital outputs They are what allow actions in the real world.

Taking into account that this component is essential for the development of the platform and for achieve the desired results in each of the projects worked there. Here we are going to show you what they are digital outputs, what are they for and how many of them contains each plateTo do 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 in two values, this is usually called –Vcc and + Vcc. With this clear, it can be said that digital outputs They 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 usually 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 the Mini, Nano and the plate which are based on processors ARM as 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 number of output will depend on the model of the plate that is being used, so this is not a fixed number. Finally, it should be noted that the digital outputs are responsible for allowing electronic projects can do 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 plate will depend mainly on its model, in this case we will show you how many digital pins They have the different models of plates that you can currently find on the market.

In the case of Arduino uno can be found 14 digital pins they can act like 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 they go from the PIN 0 to PIN 13 as shown in the following picture.

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

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

For plate Arduino swim they have 14 pins that can be used as digital outputs, for the Arduino Mini has 20 pins and for the model Mega you 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 for turn on an LED, so it won’t 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?

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

There are currently many Arduino board models available all over the world, each of them offers different characteristics so you can choose the ones that are most suitable for you. adapt to your needs. In this case we are going to show you those boards with more digital outputs that you can buy in 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 device of keyboard or mouse and it has 20 digital pins that can act as an exit or entry.
  • Arduino UNO R3: Considered today as one of the best options when starting in programming and electronics with In this case it is a robust plate ideal for taking the first steps in programming, it has a total of 14 digital pins.
  • Arduino 101: Its main advantage is the ease of use which combines it with new technologies, this is how this board has the ability to recognize gestures thanks to 6-axis accelerometer and gyroscope that it has built into there. It also offers the possibility of managing the plate from the smartphone through Bluetooth 4.0. finally this board offers 14 digital pins on your system.
  • Arduino Micro: It is considered one of the smallest plates, but which is perfect for turning any type of object into a Inteligent object, it makes use of 20 digital outputs.
  • Arduino Nano: This plate is quite similar to that of Arduino One, but this one with a much smaller size, having a much smaller size does not have a connector of power supply, this is how it has replaced connecting standard USB via micro-USB connector. It has a total of 14 digital pins.
  • Arduino Mega: It is a board that has been created to carry out complex projects, that is how it has 70 digital inputs / outputs. It has a much larger size than most boards, this has been done so that 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 is a board developed to carry out complex projects and is based on a micro controller with 32-bit ARM core.
  • Arduino MKR Zero: It is characterized by having an SD connector integrated into the circuit itself that will allow play music without iinstall 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 it is an ideal pack to carry projects of connected devices, such as the projects of the Internet of Things (IoT).

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

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

Be able to use a 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 space of Digital Pin must be replaced by the Arduino pin that you want to configure as 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); //Configura el PIN 5 como SALIDA DIGITAL}

As well there is another way to program the board’s digital output, for this you must declare a name for PIN, in this case PIN 5Keep 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:

byte Terminal_5 = 5; //Bautizó el PIN 5 con el nombre “Terminal_5”

void setup() {

pinMode(Terminal_5,OUTPUT); //Configura el PIN 5 como SALIDA

As you can see, before the SETUP, in the declarations area a variable of the type “Byte” which is baptized as “Terminal_5” and it 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 PIN 5.

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

Using the digital outputs on Arduino

When it is done configured pins what do you want to use as departure, then the following will be 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(Pin de salida,HIGH); //Energiza la SALIDA DIGITAL (5v)

digitalWrite(Pin de salida,LOW); //DesEnergiza la SALIDA DIGITAL (0v)}

In this case, the variable of Output pin by Arduino pin what do you want 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 digital output of the Arduino at Pin 5 with which it has been working.

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

void loop() {

digitalWrite(5,HIGH); //Activa o Energiza el PIN 5

}

byte Terminal_5 = 5; //Bautizo el PIN 5 con el nombre "Terminal_5"

void loop() {

digitalWrite(Terminal_5,HIGH); //Activa o Energiza el PIN 5

}

byte Terminal_5 = 5; //Bautizo el PIN 5 con el nombre "Terminal_5"

void loop() {

digitalWrite(Terminal_5,1); //Activa o Energiza el PIN 5

}

void loop() {

digitalWrite(5,1); //Activa o Energiza el 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, it can also be seen that the term HIGH what does it mean activate arduino digital output, can be substituted for the number 1 which will indicate exactly the same.

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

If you have any questions, leave them in the comments, we will answer you as soon as possible, and it will also be of great help to more members of the community. Thank you! 😉

You may be interested:

Leave a Comment