
© Royalty Free/Corbis
![]() At the junction, free electrons from the N-type material fill holes from the P-type material. This creates an insulating layer in the middle of the diode called the depletion zone. ![]() When the negative end of the circuit is hooked up to the N-type layer and the positive end is hooked up to P-type layer, electrons and holes start moving and the depletion zone disappears. |
|
Class Assignment: Control an LED display with the Arduino chip
- Insert the LED number display so that it spans the central divider of the breadboard.
If the display does not fit snugly on the breadboard, check to see that all pins are straight
and press firmly.
- Wire one cathode (referred to as a common cathode on the diagram) to the negative power track (ground).
Specifications Single Digit LED Display (276-0075) Specifications Faxback Doc. # 38029 Type: .............................................................. S321R Pinout: Pin 1: .......................................................... Anode F Pin 2: .......................................................... Anode G Pin 3: .............................................................. N/C Pin 4: ................................................... Common Cathode Pin 5: .............................................................. N/C Pin 6: .......................................................... Anode E Pin 7: .......................................................... Anode D Pin 8: .......................................................... Anode C Pin 9: .................................. RHDP (Right Hand Decimal Point) Pin 10: .............................................................. N/C Pin 11: .............................................................. N/C Pin 12: ................................................... Common Cathode Pin 13: .......................................................... Anode B Pin 14: .......................................................... Anode A NOTE: Pins 4 & 12 are internally connected
Radio Shack Common Cathode Pins
1 14 2 _ 13 | | 12 4 _ | | 6 _ 9 7 8
-
To light the different LED segments, you will experiment by connecting wires between the the different anode pins to a resistor to power.
Keep track of your results.
Write down on a piece of paper which pin lights up which segment.
Don't forget to connect pins 2-9 with 220Ω resistors. - Connect a push button using a 10K pull-down resistor.

- Connect two LEDs using 220Ω resistors.
- Create a program that when a user presses the push button, a countdown of digits is displayed,
and when the number 0 is displayed have the two LEDs blink.
code hints:
Previous Assignment counting Button presses
Create methods to turn on particular numbers:void led1(){ } void loop(){ //.... switch (btnPresses) { case 0: //do something when var == 1 led1(); break; // break is optional case 1: //do something when var == 2 break; //continue... default: // if nothing else matches, do the default // default is optional }




