Make: Projects

Using the MakerShield – Button

Learn how to make the button on the MakerShield work with the "button" example sketch in the Arduino IDE.

Using the MakerShield – Button

The MakerShield is a great prototyping shield but the button can be a little confusing to use. Since it connects to ground when pressed, it takes a little extra wiring and one change in the code to get to work with with the Arduino example sketch. Follow along!


Step #1:

Using the MakerShield – ButtonUsing the MakerShield – ButtonUsing the MakerShield – ButtonUsing the MakerShield – Button
  • First, let's lay out our parts. You'll need a MakerShield (assembled), a mini breadboard, an Arduino, 3 male jumper wires, and a 10K Ohm (Brown, Black, Orange) resistor.
  • Next, take your MakerShield (with mini breadboard attached) and place it on top of the shield headers. Make sure the pins are lined up and press it into place.
  • Great Job! Let's continue.

Step #2:

Using the MakerShield – ButtonUsing the MakerShield – ButtonUsing the MakerShield – ButtonUsing the MakerShield – Button
  • Now for the parts. Take your 10K Ohm resistor (Brown, Black, Orange) and insert one leg into the 5V pin on the MakerShield. Connect the other leg to an adjacent hole on the breadboard.
  • The reason we're doing this is to give the digital input pin something to sense. This will supply the voltage we need to let the input pin know that something is going on.
  • Next, take a jumper wire and insert one end into the breadboard right above the resistor (just like in the picture). Connect the other end of the wire to the BTN1 (button 1) pin on the MakerShield.

Step #3:

Using the MakerShield – ButtonUsing the MakerShield – ButtonUsing the MakerShield – Button
  • Now, grab another jumper wire and stick one end into the breadboard above the other jumper wire. The other end of this jumper wire will go to the D2 (digital 2) pin on the MakerShield.
  • This wire is so that the Arduino will be able to detect when the button is pressed.

Step #4:

Using the MakerShield – ButtonUsing the MakerShield – ButtonUsing the MakerShield – ButtonUsing the MakerShield – Button
  • Now we are going to connect the LED on the MakerShield to the LED output pin.
  • Take another jumper wire and connect one end to the LED1 pin on the Maker Shield. Connect the other end of the jumper wire to pin D13 (digital 13) on the MakerShield.
  • Now the LED is connected so we'll be able to see when the button is pressed.

Step #5:

Using the MakerShield – ButtonUsing the MakerShield – ButtonUsing the MakerShield – ButtonUsing the MakerShield – Button
  • Go ahead and plug your Arduino into your computer using the USB port and fire up the Arduino software.
  • Open the Button example sketch by going to File > Examples > Digital > Button.
  • Got it? Good! This sketch is written for a button that is connected to voltage on one end and a digital pin on the other. The button on the Maker Shield is different; the button connects to ground when pressed. Because of this we need to make one little change to the code.
  • Scroll down to where it says if (buttonState == HIGH) { (highlighted in the picture) and change HIGH to LOW.
  • The line should now read if (buttonState == LOW) {
  • What we just told the code that when the button is pressed on the Maker Shield (when the digital pin gets connected to ground) to light the LED up.

Step #6:

Using the MakerShield – ButtonUsing the MakerShield – ButtonUsing the MakerShield – ButtonUsing the MakerShield – Button
  • Now upload the code to your Arduino and hit the button on the MakerShield. The LED should light up!
  • Congratulations! Your button now works!
  • You can easily swap which LED lights up by switching your LED jumper wire from LED1 to LED2.
  • Play around and have fun!


Easy, huh?

Michael Castor

Michael Castor

I am the Evangelist for the Maker Shed. It seems that there is no limit to my making interests. I'm a tinkerer at heart and have a passion for solving problems and figuring out how things work. When not working for Make I can be found falling off my unicycle, running in adverse weather conditions, skiing down the nearest hill, restoring vintage motorcycles, or working on my car.


  • Charles

    Thank you so much…I’m new to arduino and just soldered the makershield together with my son…we were lost on how to verify that we set everything up correctly. This was exactly what we needed and will make our experience with the protoshield even better!

    • Jason

      Me too! Success! It worked. Both LED’s light up (after moving the jumper wire.)

  • Tonto123

    mine didn’t come with the bread board to put on top. :(

  • Martin Holguin

    hi i just put together the makershield and I wanted to say that it is very easy to solder, although
    I have not experience and after testing it (thanks to this step by step guide) I realized that it works fantastically!!!

  • Ari

    I can not find the 10K Ohm resistor nor the pushbutton, could you please give me the links?

    • Michael Castor


      The button is included in the MakerShield Kit –

      We include the 10K resistor in our Getting Started with Arduino Kit, Ultimate Arduino Microcontroller Pack, and Mintronics: Survival Pack. You can also pick one up from your local RadioShack.

      Hope that helps!

  • mathly

    The comments below are my personal opinions only. Your experience may vary.
    ‘Make’, ‘Maker Shed’, etc are basically blatant commercial money-making endeavors. I would caution anyone thinking of buying this ‘Maker Shield’ that it is NOT a ‘breadboard’, there is no ‘manual’ except brief blurbs online, in fact it is a waste of $17 if you have any circuits knowledge whatever.
    Note that the ‘mini breadboard’ appears to be available ONLY from Maker Shed. Rat Shack breadboards will not fit, nor will any other breadboard I see available online.
    The button, capacitors, LED’s resistors, wire jumpers, etc can be added to any ordinary breadboard, thus eliminating the totally unnecessary expense and effort involved in this ‘Maker Shield’ commercial product.
    Did I mention that there is no easily available manual containing even any DESCRIPTION of the underlying CIRCUIT on the ‘Maker Shield’ board itself? And, one cannot easily see into the various levels of circuit to decipher whether one would, for example, simply BLOW OUT the Led’s? For that matter, how many levels are there in the PC board?
    My opinion is that this is mainly a come-on to buy more gimmicks from ‘Make’, which is mostly just that – a store.