avishorp / TM1637

Arduino library for TM1637 (LED Driver)
GNU Lesser General Public License v3.0
428 stars 218 forks source link

Update TM1637Display.cpp #8

Closed 4ishops closed 8 years ago

4ishops commented 8 years ago

add more charecters

marcusrugger commented 8 years ago

I'm not the owner of this repo, but I can tell you that @avishorp setup the encoding to encode for hexadecimal digits. Your changes to digitsToSegment[] break that encoding.

If you look at the function encodeDigit(), the last function in the cpp file, he takes the lower nybble of the passed in value and uses it to index the array. That's how he determines which bitmap to use for a particular digit of the LED. A nybble can have 16 possible values, hence 16 entries in digitsToSegment[].

If you want to add new characters to the mapping, you need to also change the encoding strategy or add a second strategy.

avishorp commented 8 years ago

Not going to support hex display for now. Thanks, Avishay