|
| 1 | +# sevenSegmentDisplay # |
| 2 | + |
| 3 | +Compatible architecture: ALL |
| 4 | + |
| 5 | +## Description ## |
| 6 | + |
| 7 | +This library allows to drive both common-anode or common-cathode 7 segment displays. |
| 8 | + |
| 9 | +## Sintax & short command reference ## |
| 10 | + |
| 11 | +- **Creating an istance** |
| 12 | + |
| 13 | + `sevenSegmentDisplay name(displayType, A, B, C, D, E, F, G, DP);` |
| 14 | + |
| 15 | + **name** : the name of the object |
| 16 | + **displayType** : the type of the display, it can be one of these constants: **COMMON\_ANODE** or **COMMON\_CATHODE** |
| 17 | + |
| 18 | + The arguments from **A** to **G** are the pins were the relative display's segment is attached, **DP** is the decimal point |
| 19 | + |
| 20 | +- **Drawing a symbol on the display** |
| 21 | + |
| 22 | + `name.set(symbol);` |
| 23 | + |
| 24 | + **symbol** : the symbol that will be displayed on the display, it can be one of the alphanumeric characters in the following table: |
| 25 | + |
| 26 | + ***N.B: THE LETTERS MUST BE SPECIFIED INTO SINGLE QUOTES*** e.g. `name.set('A');` |
| 27 | + |
| 28 | + | Character | Symbol | |
| 29 | + |:---------:|-----------------------------------------------------------------------------------------------------------------| |
| 30 | + | 0 | | |
| 31 | + | 1 | | |
| 32 | + | 2 | | |
| 33 | + | 3 | | |
| 34 | + | 4 | | |
| 35 | + | 5 | | |
| 36 | + | 6 | | |
| 37 | + | 7 | | |
| 38 | + | 8 | | |
| 39 | + | 9 | | |
| 40 | + | 'A' || |
| 41 | + | 'b' || |
| 42 | + | 'C' || |
| 43 | + | 'c' || |
| 44 | + | 'd' || |
| 45 | + | 'E' || |
| 46 | + | 'F' || |
| 47 | + | 'H' || |
| 48 | + | 'I' || |
| 49 | + | 'J' || |
| 50 | + | 'L' || |
| 51 | + | 'n' || |
| 52 | + | 'o' || |
| 53 | + | 'P' || |
| 54 | + | 'q' || |
| 55 | + | 'r' || |
| 56 | + | 't' || |
| 57 | + | 'U' || |
| 58 | + |
| 59 | +- **Manually setting the display's segments** |
| 60 | + |
| 61 | + `name.setSegment(segment, value);` |
| 62 | + |
| 63 | + **segment** : a letter from **A** to **G** or **DP**, that identify a segment on the display |
| 64 | + |
| 65 | + ***N.B: This argument is not case sensitive but, except for DP, THE SEGMENT MUST BE SPECIFIED INTO SINGLE QUOTES*** e.g. `name.setSegment('A');` |
| 66 | + |
| 67 | + **value** : the state of the segment, it can be **HIGH** or **LOW** |
| 68 | + |
| 69 | +- **Turning off the display** |
| 70 | + |
| 71 | + `name.off();` |
| 72 | + |
| 73 | +## About the author & license info |
| 74 | + |
| 75 | +Created by ***Giuseppe Masino, 01 nov 2016*** |
| 76 | +Author URL: http://www.facebook.com/peppe.masino1 |
| 77 | + |
| 78 | +<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This work by <a xmlns:cc="http://creativecommons.org/ns#" href="https://github.com/HackerInside0/Arduino_sevenSegmentDisplay.git" property="cc:attributionName" rel="cc:attributionURL">Giuseppe Masino</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.<br />Permissions beyond the scope of this license may be available at <a xmlns:cc="http://creativecommons.org/ns#" href="https://facebook.com/peppe.masino1" rel="cc:morePermissions">https://facebook.com/peppe.masino1</a>. |
0 commit comments