I'm new to Arduino. After watching several videos and using Chat GPT I'm stuck with a problem.
I want to use a 9V 1A adapter to run an Arduino UNO R3 with a L293D motor drive expansion shield. Each of the 4 motors is a 6V DC motor with 100RPM. This part is clear.
I want to add a switch for each motor, so I can turn them ON and OFF separately. Where do I have to connect the wires from the switch? Do I have to melt them on the L293D motor shield? One end to the digital pin and the other to the GND?
I haven't bought the materials yet, I wanted to reach out for proposals.
It is essential for me to be able to turn ON and OFF the 4 motors separately.
For the popular 6mm tactile push button switches, wire one pin of each switch to ground. Wire a diagonal termian of each switch to an input with its pinMode set to INPUT_PULLUP.
You could, of course, stop any or all of the motors using software. Why do you need physical switches ?
If you do need physical switches then the conventional way to do it would be to connect/disconnect the power to each motor by putting a switch one or both wires providing power to the motor
That will not work! Dip switches handle signals and a few mA, not motor currents. They will burn. up.
Read the switches in software and let the code operate the motors desired.