How to solder multiple components on the same input or output

Hi!

My question is the following:

Can two components use the same input / output? If yes, how!

I take a simple case, when I program my module a RFID module manual me ask for example to connect the SDA output of the modu pin 9 of the Arduino and when I program an LCD screen, there is also an output which must be plugged into the pin 9.

For now I can connect the components one after the other but how do I go if I want to connect all my components at the same time? on my final product I will not miss any I / O pin as my project uses a 3.5 "LCD screen, a buzzer, an RDFI module, another 1.3" LCD screen, power button , a DC and Android input for charging, a camera.

Can I connect all this at the same time to an Arduino or ESP32? for now I can connect everything and it works!

Depends on the pin and it's function.

If you connect two leds to a digital output they will obviously be lit at the same time*.
Same for two buttons to an input, both buttons will "trigger" the input.

But SDA is part of I2C which is a bus structure. Just like SPI. It's meant to have multiple devices on it.

On I2C every device on the bus should have a unique address which distinguishes them in code.

With SPI most pins are shared but a every device has a unique Chip Select (CS) or Slave Select (SS) pin. The slave of which this pin is pulled active (usually LOW) is the one listening/talking.

Extra thing to notice is the voltages of the signals. They need to be the same or at least tolerate the other voltages.

  • Or alternating if one goes to Vcc instead of GND:p

This depends completely on your circuitry involved.

Example, an input and output to be connected to the same Arduino I/O pin.

However, outputs to outputs requires some thinking as drivers can be damaged.

The general rule is never connect two outputs together.

If one component is trying to output HIGH and the other LOW, which one wins? How can the simple wires know which one is supposed to be transmitting and which one is just holding its idle voltage?

The exception to this rule is the communication buses which allow many slaves to share a wire under the control of a master. The master tells each slave when it is allowed to transmit. SPI and I2C are the common ones you will see in the Arduino world.

You can always connect many inputs to one output although there are "fanout" limits because you can't connect a stupidly large number of inputs to one output.