Skip to content

Commit

Permalink
Enhanced character set #39
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonacox committed Apr 25, 2024
1 parent a7faa90 commit 6f8a106
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 37 deletions.
8 changes: 8 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Release Notes for TM1637TinyDisplay

## v1.11.0 - Enhanced Character Set

* Updated character set by @J-Brinkman in https://github.com/jasonacox/TM1637TinyDisplay/issues/39

```cpp
display.showString("!-/0123456789<=>?@ABCDEFGHIJKLMmNOPQRSTUVWwXYZ[]^_`abcdefghijklnnnopqrstuvvvxyz{|}~");
```

## v1.10.0 - Animation Looping

* Bug Fix (v1.9.1): Changed abs() to labs() in showNumber() function by @KelevraSlevin7 in https://github.com/jasonacox/TM1637TinyDisplay/pull/33 fixes overflow situation on some cores for showNumber()
Expand Down
34 changes: 17 additions & 17 deletions TM1637TinyDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ const uint8_t digitToSegment[] PROGMEM = {
// ASCII Map - Index 0 starts at ASCII 32
const uint8_t asciiToSegment[] PROGMEM = {
0b00000000, // 032 (Space)
0b00110000, // 033 !
0b00000110, // 033 !
0b00100010, // 034 "
0b01000001, // 035 #
0b01101101, // 036 $
0b01010010, // 037 %
0b01111100, // 038 &
0b00100000, // 039 '
0b00000010, // 039 '
0b00111001, // 040 (
0b00001111, // 041 )
0b00100001, // 042 *
Expand All @@ -89,11 +89,11 @@ const uint8_t asciiToSegment[] PROGMEM = {
0b01101111, // 057 9
0b01001000, // 058 :
0b01001000, // 059 ;
0b00111001, // 060 <
0b01100001, // 060 <
0b01001000, // 061 =
0b00001111, // 062 >
0b01000011, // 062 >
0b01010011, // 063 ?
0b01011111, // 064 @
0b01111011, // 064 @
0b01110111, // 065 A
0b01111100, // 066 B
0b00111001, // 067 C
Expand All @@ -104,9 +104,9 @@ const uint8_t asciiToSegment[] PROGMEM = {
0b01110110, // 072 H
0b00000110, // 073 I
0b00011110, // 074 J
0b01110110, // 075 K
0b01110010, // 075 K
0b00111000, // 076 L
0b00010101, // 077 M
0b00110011, // 077 M (For display use Mm)
0b00110111, // 078 N
0b00111111, // 079 O
0b01110011, // 080 P
Expand All @@ -115,8 +115,8 @@ const uint8_t asciiToSegment[] PROGMEM = {
0b01101101, // 083 S
0b01111000, // 084 T
0b00111110, // 085 U
0b00011100, // 086 V
0b00101010, // 087 W
0b00111110, // 086 V
0b00011110, // 087 W (For display use Ww)
0b01110110, // 088 X
0b01101110, // 089 Y
0b01011011, // 090 Z
Expand All @@ -126,19 +126,19 @@ const uint8_t asciiToSegment[] PROGMEM = {
0b00100011, // 094 ^
0b00001000, // 095 _
0b00100000, // 096 `
0b01110111, // 097 a
0b01011111, // 097 a
0b01111100, // 098 b
0b01011000, // 099 c
0b01011110, // 100 d
0b01111001, // 101 e
0b01111011, // 101 e
0b01110001, // 102 f
0b01101111, // 103 g
0b01110100, // 104 h
0b00000100, // 105 i
0b00011110, // 106 j
0b01110110, // 107 k
0b00001110, // 106 j
0b01110000, // 107 k
0b00011000, // 108 l
0b00010101, // 109 m
0b00100111, // 109 m (For display use nn)
0b01010100, // 110 n
0b01011100, // 111 o
0b01110011, // 112 p
Expand All @@ -148,13 +148,13 @@ const uint8_t asciiToSegment[] PROGMEM = {
0b01111000, // 116 t
0b00011100, // 117 u
0b00011100, // 118 v
0b00101010, // 119 w
0b00111100, // 119 w (For display use vv)
0b01110110, // 120 x
0b01101110, // 121 y
0b01011011, // 122 z
0b00111001, // 123 {
0b01000110, // 123 {
0b00110000, // 124 |
0b00001111, // 125 }
0b01110000, // 125 }
0b01000000, // 126 ~
0b00000000 // 127 
};
Expand Down
34 changes: 17 additions & 17 deletions TM1637TinyDisplay6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ const uint8_t digitToSegment[] PROGMEM = {
// ASCII Map - Index 0 starts at ASCII 32
const uint8_t asciiToSegment[] PROGMEM = {
0b00000000, // 032 (Space)
0b00110000, // 033 !
0b00000110, // 033 !
0b00100010, // 034 "
0b01000001, // 035 #
0b01101101, // 036 $
0b01010010, // 037 %
0b01111100, // 038 &
0b00100000, // 039 '
0b00000010, // 039 '
0b00111001, // 040 (
0b00001111, // 041 )
0b00100001, // 042 *
Expand All @@ -92,11 +92,11 @@ const uint8_t asciiToSegment[] PROGMEM = {
0b01101111, // 057 9
0b01001000, // 058 :
0b01001000, // 059 ;
0b00111001, // 060 <
0b01100001, // 060 <
0b01001000, // 061 =
0b00001111, // 062 >
0b01000011, // 062 >
0b01010011, // 063 ?
0b01011111, // 064 @
0b01111011, // 064 @
0b01110111, // 065 A
0b01111100, // 066 B
0b00111001, // 067 C
Expand All @@ -107,9 +107,9 @@ const uint8_t asciiToSegment[] PROGMEM = {
0b01110110, // 072 H
0b00000110, // 073 I
0b00011110, // 074 J
0b01110110, // 075 K
0b01110010, // 075 K
0b00111000, // 076 L
0b00010101, // 077 M
0b00110011, // 077 M (For display use Mm)
0b00110111, // 078 N
0b00111111, // 079 O
0b01110011, // 080 P
Expand All @@ -118,8 +118,8 @@ const uint8_t asciiToSegment[] PROGMEM = {
0b01101101, // 083 S
0b01111000, // 084 T
0b00111110, // 085 U
0b00011100, // 086 V
0b00101010, // 087 W
0b00111110, // 086 V
0b00011110, // 087 W (For display use Ww)
0b01110110, // 088 X
0b01101110, // 089 Y
0b01011011, // 090 Z
Expand All @@ -129,19 +129,19 @@ const uint8_t asciiToSegment[] PROGMEM = {
0b00100011, // 094 ^
0b00001000, // 095 _
0b00100000, // 096 `
0b01110111, // 097 a
0b01011111, // 097 a
0b01111100, // 098 b
0b01011000, // 099 c
0b01011110, // 100 d
0b01111001, // 101 e
0b01111011, // 101 e
0b01110001, // 102 f
0b01101111, // 103 g
0b01110100, // 104 h
0b00000100, // 105 i
0b00011110, // 106 j
0b01110110, // 107 k
0b00001110, // 106 j
0b01110000, // 107 k
0b00011000, // 108 l
0b00010101, // 109 m
0b00100111, // 109 m (For display use nn)
0b01010100, // 110 n
0b01011100, // 111 o
0b01110011, // 112 p
Expand All @@ -151,13 +151,13 @@ const uint8_t asciiToSegment[] PROGMEM = {
0b01111000, // 116 t
0b00011100, // 117 u
0b00011100, // 118 v
0b00101010, // 119 w
0b00111100, // 119 w (For display use vv)
0b01110110, // 120 x
0b01101110, // 121 y
0b01011011, // 122 z
0b00111001, // 123 {
0b01000110, // 123 {
0b00110000, // 124 |
0b00001111, // 125 }
0b01110000, // 125 }
0b01000000, // 126 ~
0b00000000 // 127 
};
Expand Down
4 changes: 2 additions & 2 deletions examples/TM1637Test/TM1637Test.ino
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ void loop()
sprintf(stringb, "25%cC", '\xB0'); // Display 25 + degree symbol + C
display.showString(stringb);
delay(TEST_DELAY);
display.clear(); // Long string test
display.showString("abcdefghijklmnopqrstuvwxyz.-=ABCDEFGHIJKLMNOPQRSTUVWXYZ");
display.clear(); // Extended characters test
display.showString("!-/0123456789<=>?@ABCDEFGHIJKLMmNOPQRSTUVWwXYZ[]^_`abcdefghijklnnnopqrstuvvvxyz{|}~");
delay(TEST_DELAY);

// Test Strings in PROGMEM flash memory
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=TM1637TinyDisplay
version=1.10.0
version=1.11.0
author=Jason Cox <jason@jasonacox.com>
maintainer=Jason Cox <jason@jasonacox.com>
sentence=A simple library to display numbers, text and animation on 4 and 6 digit 7-segment TM1637 based display modules. Offers non-blocking animations and scrolling!
Expand Down

0 comments on commit 6f8a106

Please sign in to comment.