Hello,
I would like to set a push button to start a process using the 3V channel in order to keep clear the 5V for the downstream applications. I connected one contact of the push button to the 3V pin, the top pon of the pushbutton (which remains open when the button IS NOT pressed) to pin 7, and the other pin (which is closed then the button IS NOT pressed) to the ground pin. The layout is like this:
Is the layout correct?
PS at the moment I have trouble connecting arduino to the computer since the port is not recognized. But if the layout is correct, then I can proceed once the problem is fixed...
It's normally the case that a simple button like that has a single normally open (NO) contact that closes when pressed, as that's not what you have described can you provide a link to details of where you bought it and explain how you know it behaves the way you stated.
Assuming it is a simple NO button then connect one pin to an input and the diagonally opposite pin to 0V (ground).
The button was part of a box with mixed electronic part. With a multimeter I checked that current flows on the top pins (upper right and left pins in the lower picture) only when the button is pushed.
Gigiux:
The button was part of a box with mixed electronic part. With a multimeter I checked that current flows on the top pins (upper right and left pins in the lower picture) only when the button is pushed.
Okay, then you short the 3V supply only when you push the button. As explained above, there is no need to connect the switch to either 5V or 3.3V under most circumstances.
HI,
With way you have the button connected you at the moment have 3.3V and gnd shorted OR you will short 3.3V and gnd when you press the button.
This would explain your connection problem.
You should be really drawing a proper circuit diagram and use the DMM to check the pinout of the press button.
The button only has TWO terminals, just it has a pair for each.
It is not a single pole double throw switch, it is a Normally Open single pole single throw switch.
Do as @PerryBebbington has suggested and remove the 3.3v wire and use the controllers internal pullup resistor.
Thank you bu tI got lost. I thought I created a circuit between the source (3V) and the 'drain' (GRN) when the button is OPEN and a re-direction to PIN 7 when the button is CLOSED, as shown in this picture:

)
Thank you bu tI got lost. I thought I created a circuit between the source (3V) and the 'drain' (GRN) when the button is OPEN and a re-direction to PIN 7 when the button is CLOSED, as shown in this picture:

)
I thought I created a circuit between the source (3V) and the 'drain' (GRN) when the button is OPEN
That doesn't make sense, if the button is open there is no circuit. If there were a circuit as you describe it would be a short between the 3V and ground. The button you are using is open circuit when not pressed and closed circuit when pressed. Reply #2 illustrates this.
If you think you have a button that switches between +3V and 0V then, no, it does not do that.
Your photo doesn't help much, it's difficult to follow. It would be easier to help you if you could draw a schematic of what you think you have and post that, hand drawn and photographed is fine. Please follow these instructions: How to post an image