One of the current problems with the laser tag unit is that you don't know how much health you have left. Wouldn't it be great if you could have the arduino tell you how much health you had left? There are a few ways to do this. The one we are going to go over is a seven segment LED. A seven segment LED is a group of LED's that are arranged to look like a figure 8. By lighting up different LED's, you can make numbers 0-9 (and a few other symbols, if you want).
There are seven LED's that light up each straight part of the of the figure 8 in the display (that's why it's called a 7-segment LED. There are 7 segments that light up.). If we had to wire every LED like the one that we put on our board, we would have to put 14 wires (one for the + and one for the - side of every LED) to wire our 7-segment LED. That's a lot of wires. Instead of doing that, the people that manufactured the 7-segment LED that we will be using wired all of the grounds (negative) for the LED's together to one pin. That way, you only need to connect that 1 wire to ground to have every single segment on the LED connect to ground. Nice of them, huh?
A seven segment LED looks like this:
What we need to do is connect each one of the pins that controls the lights in the seven segment display to our arduino. After that, we can program the arduino to turn on whichever segments we want in order to display a certain number. So, let's get wiring (on to Lab 8)!