hi, this is my first post so sorry if its in the wrong place
I am doing a school project that is to make a flight sim controller for my friend, everything is working fine apart from 3 specific buttons. they are the type of button that stays down when on until pushed again and it comes up (don't know technical term )
I have basic written code that just prints the current state of the switch (high or low) into the serial monitor.
my problem is that when the switch is depressed, everything is fine and I get a steady positive signal, but when it is unpressed then the signal is floating between 1 and 0 because it is not connected to anything.
it is not connected to anything because the button only has 2 pins for the button part of it and no way to connect it to ground, which is how I plan to set it to low
is there a way I can get my Arduino to 'default' this pin to ground whenever it is not connected to anything (I tried just sticking the ground pin in the same part of the breadboard - didn't have high hopes - didn't work )
Thankyou for reading,