SparkFun will be closed Monday 7/4 for the holiday. All orders placed after 2pm MT on Friday 7/1 will be shipped out next week.
The Danger Shield is an all-in-one demonstration-style board with as many sensors an inputs as we could fit. This guide will show you how to get up and running with your new shield.
First thing's first: crack open the packaging and survey your parts. You should have:
Once you've located all the parts, we can dive right in and start soldering. If you do not yet know how to solder, we recommend our Soldering 101 tutorial.
The best order in which to solder the Danger Shield parts is lowest-profile first, meaning the "shortest" parts. That way, when you flip the board over to solder, they're more likely to be held in by your work surface. In our case, this means starting with the resistors. There are three different resistor values in the kit, and the color codes for these resistors are as follows:
The resistor values are labeled on the PCB. Go ahead and solder in all the resistors in the indicated places. Bend the leads so that the resistor lies flat on the board, then spread the leads on the other side so that they are held in place. This allows you to insert and solder multiple resistors at a time. When you're finished your board should look like this:
The next lowest-profile part is the button. It is non polar, so the orientation of the button doesn't matter. Go ahead and solder the button in it's spot in the top right corner. This is the button that will reset the Arduino when pressed. Your board should now look like this:
Next up is the shift register. This is the only chip included in the kit. This chip is what the Arduino communicates with to run the seven-segment display. The Arduino shifts in the values for the particular LEDs on the display, and the shift register toggles the appropriate pins. In order to solder this chip in correctly, be sure that the semi-circular notch on the chip matches up with the semi-circular notch on the PCB silk. Double check, because if the chip is soldered incorrectly it is very difficult to remove. You may find that you need to bend the pins of the chip in a bit so that it will snap into the board. When you're done, your board should look like this:
The next step is to solder in the three LEDs. Your kit includes two yellow and one red LED. The red LED goes in the top right corner, and is the power indicator LED. The yellow LEDs go along the right side of the board, and are controlled by digital pins D5 and D6 of the Arduino. The LEDs are polar, so they must be soldered with the correct orientation in order to work. Notice the base of the LED where the leads come out. Around that base there is a flat side to the resistor. This is reflected on the PCB silk. The flat side of the resistor should line up with the flat side of the silk. The other way to tell if you're placing the part correctly is that the shorter lead is inserted into the via closer to the flat part on the silk. When you have your LED's soldered, your board should look like this:
Next, we're going to solder in the temperature and light sensors. Both parts have silk on the upper-right section of the board indicating where they should be placed. You will have to bend out the center lead of the temp sensor in order to fit it into the board. The light sensor is not polar, so orientation doesn't matter. Once these parts are soldered in, your board should look like this:
Next, we'll solder in the buttons along the bottom row. These parts are pretty self-explanatory. They're not polar, and orientation doesn't matter. Snap them into the front of the board and you can solder them all at once.
Next up is the seven-segment display. The display is really just a box of LEDs arranged and wired so that they can display numbers in what we like to call a digital-watch-style. This part is polar, so orientation matters. To place it correctly, notice the notch cut out of the bottom-right corner of the display. This is reflected in the silk on the left side of the board. Match the notch on the part to the notch on the board to place the part correctly.
The next part is the buzzer. Like the buttons, it is non polar, so orientation doesn't matter. If you're having trouble holding the buzzer flush while soldering it, you can scotch-tape it to the board to hold it in temporarily. Now your board should look like this:
The highest-profile parts in the kit are the sliders. Where they fit on the board should be obvious at this point. There is only one way to solder them into their places. So if you manage to place them incorrectly, please send us a picture. It's best to solder these in one at a time, and once again, you may want to tape them down while you're soldering to make sure they are flush to the board.
Last but not least, we have the headers. These are what connect your shield to your Arduino. This six-pin headers go on the right side of the sliders, and the eight pin headers on the left. Once these are soldered in, your shield is complete!
Now it's time for some programming. Before we actually load any code, connect your board to your Arduino and plug in the USB cable. All three LEDs should be lit and the seven-segment display should be displaying an "8".
For this example you will need two files: The Danger Shield example Arduino sketch, and the CapSense Arduino Library. Both can be downloaded here:
You can also check the Arduino CapSense page for updates to the library. This example uses V.04.
Unzip the folder, and place example sketch in your Arduino Sketchbook. Then, grab the CapSense library folder and place the folder in your Arduino->Libraries folder. The CapSense Library is required in order to use the capacitive sense pad on your shield, and documentation for it is held in the Arduino Playground.
With these files in place, you can now open your Arduino IDE, open the Danger Shield Example from your Sketchbook, and upload it to the board.
Once the code is uploaded, your shield should look the same as it did when you first powered it up, so let's see what the code is doing. Open a terminal in the Arduino IDE and make sure it is set to 9600 baud. At first, you should see this message
This is the output for the example code. This code will sequentially test each device on the Danger Shield. To move on to the next device, press the button on the bottom left marked D10. The order of the tests is as follows:
That's the basics of your Danger Shield. To see how each device is being controlled/read, be sure to read the comments in the code. Each device has its own section with an explanation of its usage. Have fun!