user3626: I've found a circuit board that has a couple of circuits (buttons, IR Receiver, LED, USB). The thing is that following the line for interfacing the buttons I came across what seems to be like buttons that are connected only to the ground line of the PCB while the other end is a free pin cable.
Is there a way for the arduino to detect the ground when the button is pressed or a way to detect a short of some kind? There is a smd and a resistor on both buttons. 
Circuit:
Main Ground-----Button-----SMD Capacitor-----Resistor(101)-----Free Pin 
Thanks in advance!
Edit: Circuit Board


user3626: I did some research on the subjects and I came with a solution: I borrowed the code from here and made some modifications to fit my needs. 
const int buttonPin = 6;
const int buttonPin1 = 7;

int previousReading = HIGH;
int previousReading1 = HIGH; 

void setup() {
  pinMode(buttonPin, INPUT_PULLUP);
  pinMode(buttonPin1, INPUT_PULLUP);
  Serial.begin(9600); 
}

void loop() {
  int reading = digitalRead(buttonPin);
  int reading1 = digitalRead(buttonPin1);

  if (previousReading == HIGH && reading == LOW) {
     Serial.println(HIGH);         
  }

  if (previousReading1 == HIGH && reading1 == LOW) {
     Serial.println(LOW);
  }

  previousReading = reading;
  previousReading1 = reading1;

}


user11509: It sounds like you might have a PCB with debounced switches on them. One such circuit for debouncing switches looks like this:

That circuit and more about switch debouncing can be found here.
A debouncer basically masks the problem of switch "bounce" which is what happens when the contacts get close and the circuit is quickly closed and opened in rapid succession until a firm connection is obtained. Its a natural problem  mechanical switches.
If that's not quite right, maybe you could help us help you better by posting a photo of the board in question.

user2881: Just connect the ground to the ground on the arduino, and the free pin to a IO pin. Enable the pull-up resistor on that pin using pinMode(<nr>, INPUT_PULLUP);. If the button is not pressed, you will read a HIGH. If the button is pressed you will read a LOW.

3626: <p>I've found a circuit board that has a couple of circuits (buttons, IR Receiver, LED, USB). The thing is that following the line for interfacing the buttons I came across what seems to be like buttons that are connected only to the ground line of the PCB while the other end is a free pin cable.</p>

<p>Is there a way for the arduino to detect the ground when the button is pressed or a way to detect a short of some kind? There is a smd and a resistor on both buttons. </p>

<p>Circuit:</p>

<p>Main Ground-----Button-----SMD Capacitor-----Resistor(101)-----Free Pin </p>

<p>Thanks in advance!</p>

<p>Edit: Circuit Board</p>

<p><a href="https://i.stack.imgur.com/6xpiZ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6xpiZ.jpg" alt="Circuit Description"></a></p>
 3626: <p>I did some research on the subjects and I came with a solution: <a href="http://blog.kennyrasschaert.be/blog/2014/04/01/digital-input-on-an-arduino-using-a-push-button/" rel="nofollow">I borrowed the code from here</a> and made some modifications to fit my needs. </p>

<pre><code>const int buttonPin = 6;
const int buttonPin1 = 7;

int previousReading = HIGH;
int previousReading1 = HIGH; 

void setup() {
  pinMode(buttonPin, INPUT_PULLUP);
  pinMode(buttonPin1, INPUT_PULLUP);
  Serial.begin(9600); 
}

void loop() {
  int reading = digitalRead(buttonPin);
  int reading1 = digitalRead(buttonPin1);

  if (previousReading == HIGH &amp;&amp; reading == LOW) {
     Serial.println(HIGH);         
  }

  if (previousReading1 == HIGH &amp;&amp; reading1 == LOW) {
     Serial.println(LOW);
  }

  previousReading = reading;
  previousReading1 = reading1;

}
</code></pre>
 11509: <p>It sounds like you might have a PCB with debounced switches on them. One such circuit for debouncing switches looks like this:</p>

<p><a href="https://i.stack.imgur.com/vVFvF.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vVFvF.jpg" alt="enter image description here"></a></p>

<p>That circuit and more about switch debouncing can be <a href="http://www.ikalogic.com/de-bouncing-circuits/" rel="nofollow noreferrer">found here</a>.</p>

<p>A debouncer basically masks the problem of switch "bounce" which is what happens when the contacts get close and the circuit is quickly closed and opened in rapid succession until a firm connection is obtained. Its a natural problem  mechanical switches.</p>

<p>If that's not quite right, maybe you could help us help you better by posting a photo of the board in question.</p>
 2881: <p>Just connect the ground to the ground on the arduino, and the free pin to a IO pin. Enable the pull-up resistor on that pin using <code>pinMode(&lt;nr&gt;, INPUT_PULLUP);</code>. If the button is not pressed, you will read a HIGH. If the button is pressed you will read a LOW.</p>
