Set single segment on 7 Segment displays#295
Conversation
This reverts commit 9be9e2b.
|
Firmware for this pull request: |
|
Firmware for this pull request: |
|
Firmware for this pull request: |
|
Firmware for this pull request: |
|
It's now also tested for the TM1637 displays. Bitorder is dABCDEFG and from the most right digit (digit 0!) to most left digit for both display types (MAX and TM). E.g. to lit segment |
|
Firmware for this pull request: |
|
Firmware for this pull request: |
|
Firmware for this pull request: |
|
Firmware for this pull request: |
|
Firmware for this pull request: |
|
Firmware for this pull request: |
|
Board and firmware folder for this pull request: |
|
Board and firmware folder for this pull request: |
Description of changes
An additional function to control a single segment is added. This requires an additional buffer for all Digits for the MAX7219. The already available
rawdatabuffer is still used for the TM1637 display.The
setSingleSegment(uint8_t subModule, uint8_t segment, uint8_t value)function requires the subModule, the segment number and the value. Segment numbers are in the range from 0 to 63, 8 bits per Digit, starting with the most right digit. For switching the segmentoffvalue must be 0x00, all other values are switching the segmenton.This can also be used for controlling 64 LED's arranged in a matrix.
Additionally the existing
rawdatabuffer is initialized dynamically and not anymore statically. So the max number of submodules is not fixed anymore to 8 and only the required memory for the number of displays is reserved in the device buffer.As this is for now only tested with a MAX7219 display, this PR is a draft one until it is tested with TM1637 displays.
Fixes #294