Seven-segment display
We can also work with special display devices that come with eight LEDs in them. They are known as seven-segment LEDs. They can display decimal numbers and decimal points. The following is a diagram of a common cathode seven-segment LED display:
Figure 6.20 – A common cathode seven-segment LED display (courtesy: https://commons.wikimedia.org/wiki/File:7-Segment_Display_Visual_Pinout_Diagram.svg and https://commons.wikimedia.org/wiki/File:7_segment_display_labeled.svg)
We must apply a positive voltage to the corresponding pins and connect the common cathode pins to the ground. We can show numbers and a few alphabetical characters with a combination of pins. For example, if we activate pins A, B, C, D, E, and F together, it will show 0. Similarly, you can figure out what pins are to be activated for other numbers and characters. As an exercise for this chapter, connect this display to the Micro:bit and write a program that cycles...