Saltar al contenido

What are Arduino digital inputs and outputs and how does it work?

What are Arduino digital inputs and outputs and how does it work?

Technological advances have advanced to the point where they allow you to carry out activities that you do not know much about, but that you actually like. This is the case with the development of Arduinos, which are electronic boards of high-level embedded systems that appeared to provide solutions to people with little knowledge of electronics and programming.

However, it will always be useful for you to know the basics about the Arduino environment you will have a better view on these boards and what you can do with them. In this post, we will show you what Arduino digital inputs and outputs are and how they work.

Arduino applications

There are various applications you can offer to each of these Arduino boards and, among other things, you can control different systems (industrial, home automation, home) to get the results you want, without having to be present and monitor the system.

To do this you need to use modules attached to these boards that contain sensors, relays and other elements that help control and supply the necessary power to engines, valves, pistons, locks, among others.

arduino pines top view

Among the applications that may interest you, you have, for example, developing your smart home using devices like Arduino and home automation. However, to develop a home automation system you will need to delve into it knowledge of communication networks and topologiesas well as electronics and programming.

Arduino board connection pins

out of common power pins of Arduino boards that are 5V and GND, you will have several pins that you can use as inputs and outputs according to your needs. At this point you will see that you will find digital inputs and analog inputs, hence the ingenuity of the creators of these systems, because they left the name free certain pins so you can use them as you wish.

Pines or most can be used as inputs and outputs, in this article we will deal with those of digital signal, which is based on the representation of logic 1 or 0. In other words, a logic 1 represents the appearance of 5 V on that pin, if it is used as output, it will deliver 5 V and if it is used as input, then it will receive 5 V.

The opposite happens with logical 0, because it does not receive and does not supply voltage on that pin. Now, to clarify these terms, you need to think of a a simple system, for example a lighting circuit.

In it, you will have a switch, cables and at least one electric lamp; In this case, the switch is the input, because with it you decide whether to turn the lamp on or off, while the lamp is the output, because it turns on or off only depending on the command received from the switch. One of the first experiences you can have with these boards is to learn how to activate LED strips with Arduino.

How to set pins as digital inputs or outputs on Arduino

view the input and output pin configuration in the arduino software

The first step before setting the pins as digital inputs and outputs on Arduino boards is to download the Arduino software from the official website, because it is there you can make relevant adjustments to set your board pins as digital inputs or outputs. Once the software is downloaded, you need to install and open it, and then follow these steps:

  • Create a new program and put the desired name
  • Start definitions in «null configuration» to set the pins as inputs or outputs (Depending on the type of board you have purchased, you will see that you will have a larger or smaller number of inputs and outputs)
  • In general, the word pinMode (x, Input) or pinMode (x, Output) define the pin as input or output. Note that the letter «x» determines the number of the pin that you will assign as input or output.

Lastly, you need to know that these boards are gaining more strength and presence in the field every day. development of applications of different natures, so you can expand your knowledge by visiting the official Arduino page and consolidating the information we have provided.