Defines for extra char in 7segs
This commit is contained in:
parent
75af2b9196
commit
f7c4a46b9f
|
@ -42,7 +42,9 @@ int midend; //value of middle digit to indicate end nr (0..9)
|
|||
int rigend; //value of middle digit to indicate end nr (0..9)
|
||||
int comend; //value of combined left and middle digit. In case of practise end the P from the left digit should be projected. else the middle digit (0..9 or 15 (15 means P to indicate practise end))
|
||||
|
||||
int segment[16] = {0x03f, 0x006, 0x05b, 0x04f, 0x066, 0x06d, 0x07d, 0x007, 0x07f, 0x06f, 0x040, 0x000, 0x03f, 0x000, 0x000, 0x073}; //0,1,2,3,4,5,6,7,8,9,-, , , , ,P
|
||||
#define CHAR_P 15
|
||||
#define CHAR_DASH 10
|
||||
const uint8_t segment[16] = {0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x40, 0x00, 0x3f, 0x00, 0x00, 0x73}; //0,1,2,3,4,5,6,7,8,9,-, , , , ,P
|
||||
|
||||
|
||||
enum PanelSide_t {LEFT, RIGHT};
|
||||
|
@ -229,7 +231,7 @@ void loop()
|
|||
digitalWrite(20, (trafficvalue & 0x0020) ? HIGH : LOW); //orange right side
|
||||
digitalWrite(21, (trafficvalue & 0x0040) ? HIGH : LOW); //red right side
|
||||
//digits
|
||||
digitalWrite(23, (rightcountvalue & 0x0008) and (segment[leftdigit] != 0x040)); //dots to indicate minutes or seconds indication
|
||||
digitalWrite(23, (rightcountvalue & 0x0008) and (leftdigit == CHAR_DASH); //dots to indicate minutes or seconds indication
|
||||
rightdigit = ((rightcountvalue >> 4) & B00001111);
|
||||
middigit = ((rightcountvalue >> 8) & B00001111);
|
||||
leftdigit = ((rightcountvalue >> 12) & B00001111);
|
||||
|
@ -241,7 +243,7 @@ void loop()
|
|||
digitalWrite(20, trafficvalue & 0x0100); //orange left side
|
||||
digitalWrite(21, trafficvalue & 0x0200); //red left side
|
||||
//digits
|
||||
digitalWrite(23, (leftcountvalue & 0x0008) and (segment[leftdigit] != 0x040)); //dots to indicate minutes or seconds indication
|
||||
digitalWrite(23, (leftcountvalue & 0x0008) and (leftdigit == CHAR_DASH)); //dots to indicate minutes or seconds indication
|
||||
rightdigit = ((leftcountvalue >> 4) & B00001111);
|
||||
middigit = ((leftcountvalue >> 8) & B00001111);
|
||||
leftdigit = ((leftcountvalue >> 12) & B00001111);
|
||||
|
|
Loading…
Reference in New Issue