Button Board

0. Learning More About Buttons

0.1 Introduction

Buttons are horribly complicated and the original motivator for starting Painless Prototyping. If you’d like to learn more about push buttons, I suggest checking out this basic intro which talks about floating inputs and this article about debouncing.

1. Building the Button Board

1.1 Tools

  • Soldering Iron
  • Solder
  • Needle nose pliers
  • Tool to trim board with
  • Solder Wick or Solder Sucker
  • Sponge
  • Breadboard

dsc09481-edit

1.2 Materials

  • 1x Button Board
  • 12x Buttons
  • 16x Button Caps (Upgraded from 12x Button Caps)
  • 12x 10K Ohm Resistors
  • 1x 220 Resistor
  • 1x Green LED
  • 12x Female Header Pins (Optional)
  • 12x Male Header Pins (Optional)
  • 12x Stickers (Optional)
dsc09467

Note 1: The colors of the components you have may be different.
Note 2: Your board includes 12x female and 12x header pins. You can choose if you would like to use either or both.

1.3 Get Soldering

If you’ve never soldered before, I recommend checking out Adafruit’s Guide to Excellent Soldering.

The following list shows where each component is soldered. If you would prefer a video, look below..

  • 5V GND: Solder two male header pins with the longer side pointing up.
  • OUT1 & OUT2: You can choose if you would like to use both female and male header pins or just one of the two. Whichever option that is selected, the board will work.
  • PWER: Ensure the LED is facing the correct way or it won’t work.
  • R1 – R12: Solder 1x 10K Ohm resistor at each position.
  • R13: Solder the 220 Ohm resistor here.
  • S1-S12: Solder one button per.

2. Arduino Introduction

2.1 Instructions

Read along below or watch this video.

  1. Wire up pins s1 through s12 on the Button Board to pins 2 through 13 on the Arduino.
  2. Copy the code below into the Arduino IDE, upload it, open the Serial monitor(Tools -> Serial Monitor).
  3. Press each button and check out the Serial Monitor.

2.2 Hello World Sample Sketch

3. Raspberry Pi Introduction

Here is sample code to get up and running with the Raspberry Pi

4. Issues

Issue

Potential Solutions

Button presses are not showing up in the Serial Monitor.
  • In the Serial Monitor, make sure in the bottom right corner it reads 9600 baud.
  • Ensure that everything is properly wired up. There should be no wires to pin 0 or 1 on the Arduino.
  • Check your soldering.
  • Is the green LED on the board on? If not, check that the Button Board is is powered on and the Arduino is plugged in.
The serial monitor is being spammed and I’m not pressing a button.
  • All 12 buttons must be plugged in to test. If you’re not testing all 12 buttons, make sure to comment out the ones not being tested. For example, if you’re not using buttons 8 through 12, add /* to the start of line 81 and */ to the end of line 100.
  • Check your soldering.

Have another issue? Leave a comment below and I’ll get back to you ASAP.

Leave a Reply

Your email address will not be published. Required fields are marked *