├── Firmware ├── 1DigitRGB_CistercianClock │ └── 1DigitRGB_CistercianClock.ino ├── 3DigitRGB_CistercianClock │ └── 3DigitRGB_CistercianClock.ino └── CistercianDisplay.ino ├── Hardware ├── CDisplay Body.stl ├── CDisplay Diffuser.stl ├── CDisplay Spacer.stl ├── CDisplay_Neopixel_Gerbers.zip ├── Flexypin.lbr ├── cistercianDisplay.brd ├── cistercianDisplay.sch └── cistercianDisplay_Gerbers.zip ├── Media ├── Cistercian Display Explode.png ├── Cistercian Display ISO.png ├── Cistercian Display.png ├── Cistercian decode.png ├── CistercianSch.png ├── Display Dimensions.png ├── Display pinout.png ├── RGB Cistercian Display Sch.png └── SK6812 Driving data.png └── README.md /Firmware/1DigitRGB_CistercianClock/1DigitRGB_CistercianClock.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #define SERIAL_PIN 35 6 | #define UPDATERATE 20 7 | 8 | Adafruit_NeoPixel cDisplay = Adafruit_NeoPixel(31, SERIAL_PIN, NEO_GRB + NEO_KHZ800); 9 | 10 | int segmentColor = 0; 11 | int nextColor = 1; 12 | unsigned long requestDueTime; 13 | unsigned int displayData = 1; 14 | bool updateData; 15 | 16 | const char *ntpServer = "pool.ntp.org"; 17 | const long gmtOffset_sec = -3600 * 6; 18 | const int daylightOffset_sec = 3600; 19 | 20 | const char *ssid = "YourWifi"; 21 | const char *password = "YourPassword"; 22 | 23 | // 1 to 9 digit cistercian representation 24 | // 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 25 | bool numberUnits[10][32] = { { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // 0 26 | { 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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7 69 | { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0 }, // 8 70 | { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0 } }; // 9 71 | uint32_t Wheel(byte WheelPos); 72 | void setDigit(int digit); 73 | struct tm timeinfo; 74 | 75 | void setup() { 76 | Serial.begin(115200); 77 | 78 | pinMode(38,OUTPUT); 79 | digitalWrite(38,HIGH); 80 | 81 | cDisplay.begin(); 82 | cDisplay.setBrightness(60); 83 | cDisplay.show(); // Initialize all pixels to 'off' 84 | 85 | uint8_t wifiConectionAttmps = 0; 86 | 87 | WiFi.begin(ssid, password); 88 | Serial.print("Connecting to "); 89 | Serial.print(ssid); 90 | while (WiFi.status() != WL_CONNECTED & wifiConectionAttmps < 20) { 91 | delay(500); 92 | Serial.print("."); 93 | wifiConectionAttmps++; 94 | } 95 | 96 | configTime(gmtOffset_sec, daylightOffset_sec, ntpServer); 97 | for (int i = 0; i < 32; i++){ cDisplay.setPixelColor(i, cDisplay.Color(0, 255, 0)); }cDisplay.show();delay(500); 98 | for (int i = 0; i < 32; i++){ cDisplay.setPixelColor(i, cDisplay.Color(255, 0, 0)); }cDisplay.show();delay(500); 99 | for (int i = 0; i < 32; i++){ cDisplay.setPixelColor(i, cDisplay.Color(0, 0, 255)); }cDisplay.show();delay(500); 100 | 101 | setDigit(9999); 102 | delay(1000); 103 | segmentColor = 1; 104 | } 105 | 106 | void loop() { 107 | 108 | getLocalTime(&timeinfo); 109 | if (millis() > requestDueTime) { // Update clock data every second 110 | updateData = 1; 111 | requestDueTime = millis() + UPDATERATE; 112 | } 113 | 114 | if (updateData == 1) { 115 | segmentColor++; 116 | if(segmentColor == 255)segmentColor = 1; 117 | 118 | setMinute(timeinfo.tm_min);nextColor++; 119 | cDisplay.setPixelColor(1,Wheel(segmentColor +(nextColor * 32)));nextColor++; 120 | setHour(timeinfo.tm_hour); 121 | nextColor = 0; 122 | updateData = 0; 123 | } 124 | } 125 | 126 | // Input a value 0 to 255 to get a color value. 127 | // The colours are a transition r - g - b - back to r. 128 | uint32_t Wheel(byte WheelPos) { 129 | WheelPos = 255 - WheelPos; 130 | if(WheelPos < 85) { 131 | return cDisplay.Color(255 - WheelPos * 3, 0, WheelPos * 3); 132 | } 133 | if(WheelPos < 170) { 134 | WheelPos -= 85; 135 | return cDisplay.Color(0, WheelPos * 3, 255 - WheelPos * 3); 136 | } 137 | WheelPos -= 170; 138 | return cDisplay.Color(WheelPos * 3, 255 - WheelPos * 3, 0); 139 | } 140 | 141 | void setDigit(int digit) { 142 | if (digit > 9999) digit = 0; 143 | int thousands = digit / 1000; 144 | int hundreds = (digit - (thousands * 1000)) / 100; 145 | int tens = (digit - (thousands * 1000) - (hundreds * 100)) / 10; 146 | int units = digit - (thousands * 1000) - (hundreds * 100) - (tens * 10); 147 | 148 | for (int i = 0; i < 32; i++) { 149 | if(numberThousands[thousands][i] | numberHundreds[hundreds][i] | numberTens[tens][i] | numberUnits[units][i]){ 150 | nextColor++; 151 | cDisplay.setPixelColor(i,Wheel(segmentColor+(nextColor*32))); 152 | }else{ 153 | cDisplay.setPixelColor(i, cDisplay.Color(0,0,0)); 154 | } 155 | } 156 | cDisplay.show(); 157 | } 158 | 159 | void setHour(int digit) { 160 | if (digit > 9999) digit = 0; 161 | int thousands = digit / 1000; 162 | int hundreds = (digit - (thousands * 1000)) / 100; 163 | int tens = (digit - (thousands * 1000) - (hundreds * 100)) / 10; 164 | int units = digit - (thousands * 1000) - (hundreds * 100) - (tens * 10); 165 | 166 | for (int i = 2; i < 17; i++) { 167 | if(numberThousands[thousands][i] | numberHundreds[hundreds][i] | numberTens[tens][i] | numberUnits[units][i]){ 168 | cDisplay.setPixelColor(i,Wheel(segmentColor+(nextColor*32))); 169 | }else{ 170 | cDisplay.setPixelColor(i, cDisplay.Color(0,0,0)); 171 | } 172 | } 173 | cDisplay.show(); 174 | } 175 | 176 | void setMinute(int digit) { 177 | digit = digit*100; 178 | if (digit > 9999) digit = 0; 179 | int thousands = digit / 1000; 180 | int hundreds = (digit - (thousands * 1000)) / 100; 181 | int tens = (digit - (thousands * 1000) - (hundreds * 100)) / 10; 182 | int units = digit - (thousands * 1000) - (hundreds * 100) - (tens * 10); 183 | 184 | for (int i = 17; i < 31; i++) { 185 | if(numberThousands[thousands][i] | numberHundreds[hundreds][i] | numberTens[tens][i] | numberUnits[units][i]){ 186 | cDisplay.setPixelColor(i,Wheel(segmentColor+(nextColor*32))); 187 | }else{ 188 | cDisplay.setPixelColor(i, cDisplay.Color(0,0,0)); 189 | } 190 | } 191 | cDisplay.setPixelColor(0,Wheel(segmentColor+(nextColor*32))); 192 | cDisplay.show(); 193 | } 194 | -------------------------------------------------------------------------------- /Firmware/3DigitRGB_CistercianClock/3DigitRGB_CistercianClock.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #define SDIGITS 8 6 | #define SCOLON 9 7 | 8 | #define UPDATERATE 10 9 | 10 | unsigned int segmentColor; 11 | unsigned int nextColor; 12 | unsigned long requestDueTime; 13 | unsigned int prevHour; 14 | unsigned int prevMinute; 15 | unsigned int prevSecond; 16 | unsigned int prevColon; 17 | bool updateData; 18 | 19 | const char *ntpServer = "pool.ntp.org"; 20 | const long gmtOffset_sec = -3600 * 6; 21 | const int daylightOffset_sec = 3600; 22 | 23 | const char *ssid = "YourWifi"; 24 | const char *password = "YourPassword"; 25 | 26 | Adafruit_NeoPixel digitStrip = Adafruit_NeoPixel(93,SDIGITS,NEO_GRB + NEO_KHZ800); 27 | Adafruit_NeoPixel colonStrip = Adafruit_NeoPixel(4, SCOLON, NEO_GRB + NEO_KHZ800); 28 | 29 | // 1 to 9 digit cistercian representation 30 | // 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 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, 0, 0, 1, 1, 0 }, // 5 73 | { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, // 6 74 | { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 }, // 7 75 | { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0 }, // 8 76 | { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0 } }; // 9 77 | 78 | struct tm timeinfo; 79 | 80 | void setup() { 81 | Serial.begin(115200); 82 | 83 | 84 | digitStrip.begin(); 85 | digitStrip.setBrightness(60); 86 | digitStrip.show(); // Initialize all pixels to 'off' 87 | 88 | colonStrip.begin(); 89 | colonStrip.setBrightness(60); 90 | colonStrip.show(); // Initialize all pixels to 'off' 91 | 92 | configTime(gmtOffset_sec, daylightOffset_sec, ntpServer); 93 | for (int i = 0; i < 93; i++){ digitStrip.setPixelColor(i, digitStrip.Color(0, 255, 0)); }digitStrip.show();delay(500); 94 | for (int i = 0; i < 93; i++){ digitStrip.setPixelColor(i, digitStrip.Color(255, 0, 0)); }digitStrip.show();delay(500); 95 | for (int i = 0; i < 93; i++){ digitStrip.setPixelColor(i, digitStrip.Color(0, 0, 255)); }digitStrip.show();delay(500); 96 | 97 | uint8_t wifiConectionAttmps = 0; 98 | 99 | WiFi.begin(ssid, password); 100 | Serial.print("Connecting to "); 101 | Serial.print(ssid); 102 | while (WiFi.status() != WL_CONNECTED & wifiConectionAttmps < 20) { 103 | delay(500); 104 | Serial.print("."); 105 | wifiConectionAttmps++; 106 | } 107 | 108 | configTime(gmtOffset_sec, daylightOffset_sec, ntpServer); 109 | 110 | // Display Time and initialize varibles 111 | getLocalTime(&timeinfo); 112 | nextColor = 1; 113 | } 114 | 115 | void loop() { 116 | getLocalTime(&timeinfo); 117 | 118 | if (millis() > requestDueTime) { // Update clock data every 2 seconds 119 | updateData = 1; 120 | requestDueTime = millis() + UPDATERATE; 121 | } 122 | 123 | 124 | if (updateData == 1) { 125 | 126 | segmentColor++; 127 | if(segmentColor == 255)segmentColor = 1; 128 | 129 | displayTime(timeinfo.tm_hour,timeinfo.tm_min,timeinfo.tm_sec); 130 | updateData = 0; 131 | } 132 | 133 | } 134 | 135 | // Input a value 0 to 255 to get a color value. 136 | // The colours are a transition r - g - b - back to r. 137 | uint32_t Wheel(byte WheelPos) { 138 | WheelPos = 255 - WheelPos; 139 | if(WheelPos < 85) { 140 | return digitStrip.Color(255 - WheelPos * 3, 0, WheelPos * 3); 141 | } 142 | if(WheelPos < 170) { 143 | WheelPos -= 85; 144 | return digitStrip.Color(0, WheelPos * 3, 255 - WheelPos * 3); 145 | } 146 | WheelPos -= 170; 147 | return digitStrip.Color(WheelPos * 3, 255 - WheelPos * 3, 0); 148 | } 149 | 150 | void displayTime( int hours, int minutes, int seconds ){ 151 | 152 | if (hours > 9999) hours = 0; 153 | int h_thousands = hours / 1000; 154 | int h_hundreds = (hours - (h_thousands * 1000)) / 100; 155 | int h_tens = (hours - (h_thousands * 1000) - (h_hundreds * 100)) / 10; 156 | int h_units = hours - (h_thousands * 1000) - (h_hundreds * 100) - (h_tens * 10); 157 | 158 | if (minutes > 9999) minutes = 0; 159 | int m_thousands = minutes / 1000; 160 | int m_hundreds = (minutes - (m_thousands * 1000)) / 100; 161 | int m_tens = (minutes - (m_thousands * 1000) - (m_hundreds * 100)) / 10; 162 | int m_units = minutes - (m_thousands * 1000) - (m_hundreds * 100) - (m_tens * 10); 163 | 164 | if (seconds > 9999) seconds = 0; 165 | int s_thousands = seconds / 1000; 166 | int s_hundreds = (seconds - (s_thousands * 1000)) / 100; 167 | int s_tens = (seconds - (s_thousands * 1000) - (s_hundreds * 100)) / 10; 168 | int s_units = seconds - (s_thousands * 1000) - (s_hundreds * 100) - (s_tens * 10); 169 | 170 | 171 | for (int i = 62; i < 93; i++) { 172 | if(numberThousands[s_thousands][i-62] | numberHundreds[s_hundreds][i-62] | numberTens[s_tens][i-62] | numberUnits[s_units][i-62]){ 173 | digitStrip.setPixelColor(i, Wheel(segmentColor+(nextColor*16))); 174 | }else{ 175 | digitStrip.setPixelColor(i, digitStrip.Color(0, 0, 0)); 176 | }nextColor++; 177 | } 178 | 179 | 180 | colonStrip.setPixelColor(0, Wheel(segmentColor+(nextColor*16))); 181 | colonStrip.setPixelColor(1, Wheel(segmentColor+(nextColor*16))); 182 | nextColor++; 183 | 184 | for (int i = 31; i < 62; i++) { 185 | if(numberThousands[m_thousands][i-31] | numberHundreds[m_hundreds][i-31] | numberTens[m_tens][i-31] | numberUnits[m_units][i-31]){ 186 | digitStrip.setPixelColor(i, Wheel(segmentColor+(nextColor*16))); 187 | }else{ 188 | digitStrip.setPixelColor(i, digitStrip.Color(0, 0, 0)); 189 | }nextColor++; 190 | } 191 | 192 | 193 | colonStrip.setPixelColor(2, Wheel(segmentColor+(nextColor*16))); 194 | colonStrip.setPixelColor(3, Wheel(segmentColor+(nextColor*16))); 195 | nextColor++; 196 | 197 | for (int i = 0; i < 31; i++) { 198 | if(numberThousands[h_thousands][i] | numberHundreds[h_hundreds][i] | numberTens[h_tens][i] | numberUnits[h_units][i]){ 199 | digitStrip.setPixelColor(i, Wheel(segmentColor+(nextColor*16))); 200 | }else{ 201 | digitStrip.setPixelColor(i, digitStrip.Color(0, 0, 0)); 202 | }nextColor++; 203 | } 204 | 205 | digitStrip.show(); 206 | colonStrip.show(); 207 | nextColor = 0; 208 | } 209 | -------------------------------------------------------------------------------- /Firmware/CistercianDisplay.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define SK6812LED 18 5 | 6 | #define SERIAL_PIN 35 7 | #define CLOCK_PIN 36 8 | #define LATCH_PIN 33 9 | #define ENABLE_PIN 34 10 | 11 | #define HRS_LED 11 12 | #define MIN_LED 10 13 | #define MONTH_LED 9 14 | #define DAY_LED 8 15 | #define YEAR_LED 7 16 | 17 | #define CLOCKCYCLES 3 18 | #define UPDATERATE 2000 19 | 20 | unsigned long requestDueTime; 21 | unsigned int displayData = 1; 22 | unsigned int turnOnClock = 0; 23 | unsigned int prevMinutes = 0; 24 | bool updateData; 25 | 26 | const char *ntpServer = "pool.ntp.org"; 27 | const long gmtOffset_sec = -3600 * 6; 28 | const int daylightOffset_sec = 3600; 29 | 30 | const char *ssid = "YourWifi"; 31 | const char *password = "YourPassword"; 32 | 33 | // 1 to 9 digit cistercian representation 34 | // 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 35 | bool numberUnits[10][32] = { { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // 0 36 | { 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // 1 37 | { 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // 2 38 | { 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // 3 39 | { 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // 4 40 | { 1,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0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 }, // 1 73 | { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 }, // 2 74 | { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0 }, // 3 75 | { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0 }, // 4 76 | { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0 }, // 5 77 | { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, // 6 78 | { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 }, // 7 79 | { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0 }, // 8 80 | { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0 } }; // 9 81 | 82 | void setDigit(int digit); 83 | struct tm timeinfo; 84 | 85 | void setup() { 86 | Serial.begin(115200); 87 | 88 | pinMode(ENABLE_PIN, OUTPUT); 89 | pinMode(SERIAL_PIN, OUTPUT); 90 | pinMode(CLOCK_PIN, OUTPUT); 91 | pinMode(LATCH_PIN, OUTPUT); 92 | 93 | pinMode(MONTH_LED, OUTPUT); 94 | pinMode(DAY_LED, OUTPUT); 95 | pinMode(YEAR_LED, OUTPUT); 96 | pinMode(HRS_LED, OUTPUT); 97 | pinMode(MIN_LED, OUTPUT); 98 | 99 | digitalWrite(HRS_LED, LOW); 100 | digitalWrite(MIN_LED, LOW); 101 | digitalWrite(MONTH_LED, LOW); 102 | digitalWrite(DAY_LED, LOW); 103 | digitalWrite(YEAR_LED, LOW); 104 | digitalWrite(ENABLE_PIN, HIGH); 105 | 106 | uint8_t wifiConectionAttmps = 0; 107 | 108 | WiFi.begin(ssid, password); 109 | Serial.print("Connecting to "); 110 | Serial.print(ssid); 111 | while (WiFi.status() != WL_CONNECTED & wifiConectionAttmps < 20) { 112 | delay(500); 113 | Serial.print("."); 114 | wifiConectionAttmps++; 115 | } 116 | 117 | configTime(gmtOffset_sec, daylightOffset_sec, ntpServer); 118 | 119 | digitalWrite(HRS_LED, HIGH); 120 | digitalWrite(MIN_LED, HIGH); 121 | digitalWrite(MONTH_LED, HIGH); 122 | digitalWrite(DAY_LED, HIGH); 123 | digitalWrite(YEAR_LED, HIGH); 124 | 125 | digitalWrite(ENABLE_PIN, LOW); 126 | 127 | setDigit(1111); 128 | delay(250); 129 | setDigit(2222); 130 | delay(250); 131 | setDigit(3333); 132 | delay(250); 133 | setDigit(4444); 134 | delay(250); 135 | setDigit(5555); 136 | delay(250); 137 | setDigit(6666); 138 | delay(250); 139 | setDigit(7777); 140 | delay(250); 141 | setDigit(8888); 142 | delay(250); 143 | setDigit(9999); 144 | delay(250); 145 | setDigit(0000); 146 | delay(250); 147 | digitalWrite(HRS_LED, LOW); 148 | digitalWrite(MIN_LED, LOW); 149 | digitalWrite(MONTH_LED, LOW); 150 | digitalWrite(DAY_LED, LOW); 151 | digitalWrite(YEAR_LED, LOW); 152 | } 153 | 154 | void loop() { 155 | getLocalTime(&timeinfo); 156 | 157 | if (prevMinutes != timeinfo.tm_min) { // Display Clocl for a couple of cycles every minute 158 | turnOnClock = 0; 159 | prevMinutes = timeinfo.tm_min; 160 | } 161 | 162 | if (millis() > requestDueTime) { // Update clock data every 2 seconds 163 | updateData = 1; 164 | requestDueTime = millis() + UPDATERATE; 165 | } 166 | 167 | if (updateData == 1) { 168 | switch (displayData++) { 169 | case 1: 170 | if (turnOnClock <= (CLOCKCYCLES)) { 171 | turnOnClock++; 172 | digitalWrite(ENABLE_PIN, LOW); 173 | Serial.print("Clock cycle: "); 174 | Serial.println(turnOnClock); 175 | } 176 | 177 | if (turnOnClock > (CLOCKCYCLES) ) { 178 | digitalWrite(ENABLE_PIN, HIGH); 179 | Serial.println("Display Power off!"); 180 | } 181 | 182 | digitalWrite(YEAR_LED, LOW); 183 | digitalWrite(HRS_LED, HIGH); 184 | setDigit(timeinfo.tm_hour); 185 | Serial.print(" Hour: "); 186 | Serial.print(timeinfo.tm_hour); 187 | break; 188 | case 2: 189 | digitalWrite(HRS_LED, LOW); 190 | digitalWrite(MIN_LED, HIGH); 191 | setDigit(timeinfo.tm_min); 192 | Serial.print(" Minute: "); 193 | Serial.print(timeinfo.tm_min); 194 | break; 195 | case 3: 196 | digitalWrite(MIN_LED, LOW); 197 | digitalWrite(MONTH_LED, HIGH); 198 | setDigit(timeinfo.tm_mon + 1); 199 | Serial.print(" Month: "); 200 | Serial.print(timeinfo.tm_mon + 1); 201 | break; 202 | case 4: 203 | digitalWrite(MONTH_LED, LOW); 204 | digitalWrite(DAY_LED, HIGH); 205 | setDigit(timeinfo.tm_mday); 206 | Serial.print(" Day: "); 207 | Serial.print(timeinfo.tm_mday); 208 | break; 209 | case 5: 210 | digitalWrite(DAY_LED, LOW); 211 | digitalWrite(YEAR_LED, HIGH); 212 | setDigit(timeinfo.tm_year + 1900); 213 | Serial.print(" Year: "); 214 | Serial.println(timeinfo.tm_year + 1900); 215 | break; 216 | default: 217 | setDigit(9999); 218 | break; 219 | } 220 | updateData = 0; 221 | if (displayData > 5) 222 | displayData = 1; 223 | } 224 | } 225 | 226 | void setDigit(int digit) { 227 | if (digit > 9999) digit = 0; 228 | int thousands = digit / 1000; 229 | int hundreds = (digit - (thousands * 1000)) / 100; 230 | int tens = (digit - (thousands * 1000) - (hundreds * 100)) / 10; 231 | int units = digit - (thousands * 1000) - (hundreds * 100) - (tens * 10); 232 | 233 | digitalWrite(LATCH_PIN, HIGH); 234 | for (int i = 0; i < 32; i++) { 235 | digitalWrite(CLOCK_PIN, LOW); 236 | digitalWrite(SERIAL_PIN, numberThousands[thousands][i] | numberHundreds[hundreds][i] | numberTens[tens][i] | numberUnits[units][i]); 237 | digitalWrite(CLOCK_PIN, HIGH); 238 | } 239 | digitalWrite(LATCH_PIN, LOW); 240 | } 241 | -------------------------------------------------------------------------------- /Hardware/CDisplay Body.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JosueAGtz/cistercianDisplay/ea016556506b37f06a2491ac01dc3098cb083055/Hardware/CDisplay Body.stl -------------------------------------------------------------------------------- /Hardware/CDisplay Diffuser.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JosueAGtz/cistercianDisplay/ea016556506b37f06a2491ac01dc3098cb083055/Hardware/CDisplay Diffuser.stl -------------------------------------------------------------------------------- /Hardware/CDisplay Spacer.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JosueAGtz/cistercianDisplay/ea016556506b37f06a2491ac01dc3098cb083055/Hardware/CDisplay Spacer.stl -------------------------------------------------------------------------------- /Hardware/CDisplay_Neopixel_Gerbers.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JosueAGtz/cistercianDisplay/ea016556506b37f06a2491ac01dc3098cb083055/Hardware/CDisplay_Neopixel_Gerbers.zip -------------------------------------------------------------------------------- /Hardware/Flexypin.lbr: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | >NAME 115 | 116 | 117 | 118 | 119 | FlexyPin is a connector pin designed to be used with castellated modules with pitch down to 1.27mm. You might be able to use it with 1.00mm pitch but that would require a more expensive PCB because the footprint drills would be very close. 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | Since Version 8.3, EAGLE supports URNs for individual library 143 | assets (packages, symbols, and devices). The URNs of those assets 144 | will not be understood (or retained) with this version. 145 | 146 | 147 | Since Version 8.3, EAGLE supports the association of 3D packages 148 | with devices in libraries, schematics, and board files. Those 3D 149 | packages will not be understood (or retained) with this version. 150 | 151 | 152 | 153 | -------------------------------------------------------------------------------- /Hardware/cistercianDisplay_Gerbers.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JosueAGtz/cistercianDisplay/ea016556506b37f06a2491ac01dc3098cb083055/Hardware/cistercianDisplay_Gerbers.zip -------------------------------------------------------------------------------- /Media/Cistercian Display Explode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JosueAGtz/cistercianDisplay/ea016556506b37f06a2491ac01dc3098cb083055/Media/Cistercian Display Explode.png -------------------------------------------------------------------------------- /Media/Cistercian Display ISO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JosueAGtz/cistercianDisplay/ea016556506b37f06a2491ac01dc3098cb083055/Media/Cistercian Display ISO.png -------------------------------------------------------------------------------- /Media/Cistercian Display.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JosueAGtz/cistercianDisplay/ea016556506b37f06a2491ac01dc3098cb083055/Media/Cistercian Display.png -------------------------------------------------------------------------------- /Media/Cistercian decode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JosueAGtz/cistercianDisplay/ea016556506b37f06a2491ac01dc3098cb083055/Media/Cistercian decode.png -------------------------------------------------------------------------------- /Media/CistercianSch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JosueAGtz/cistercianDisplay/ea016556506b37f06a2491ac01dc3098cb083055/Media/CistercianSch.png -------------------------------------------------------------------------------- /Media/Display Dimensions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JosueAGtz/cistercianDisplay/ea016556506b37f06a2491ac01dc3098cb083055/Media/Display Dimensions.png -------------------------------------------------------------------------------- /Media/Display pinout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JosueAGtz/cistercianDisplay/ea016556506b37f06a2491ac01dc3098cb083055/Media/Display pinout.png -------------------------------------------------------------------------------- /Media/RGB Cistercian Display Sch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JosueAGtz/cistercianDisplay/ea016556506b37f06a2491ac01dc3098cb083055/Media/RGB Cistercian Display Sch.png -------------------------------------------------------------------------------- /Media/SK6812 Driving data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JosueAGtz/cistercianDisplay/ea016556506b37f06a2491ac01dc3098cb083055/Media/SK6812 Driving data.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Single color Cistercian Display 2 | 31 segments digital Cistercian Display with constant current serial to parallel driver. If you need more info please visit my blog https://savageelectronics.com/cistercian-display/ 3 | 4 | ## RGB Cistercian Display 5 | 31 Segments RGB Cistercian Display with cascade SK6812 LEDs. 6 | 7 | ![displayPhoto](https://savageelectronics.com/wp-content/uploads/2023/02/cistercianDisplayOSHWA-scaled.jpg) 8 | 9 | ![displayDriving](https://github.com/JosueAGtz/cistercianDisplay/blob/main/Media/SK6812%20Driving%20data.png?raw=true) 10 | 11 | ## Cistercian Display Decode 12 | ![displayDecode](https://github.com/JosueAGtz/cistercianDisplay/blob/main/Media/Cistercian%20decode.png?raw=true) 13 | 14 | ## RGB Cistercian Display Dimensions and Pinout 15 | ![displayDimensions](https://github.com/JosueAGtz/cistercianDisplay/blob/main/Media/Display%20Dimensions.png?raw=true) 16 | ![displayPinout](https://github.com/JosueAGtz/cistercianDisplay/blob/main/Media/Display%20pinout.png?raw=true) 17 | 18 | ## Cistercian Display 3D Model 19 | ![displayISOMesh](https://github.com/JosueAGtz/CistercianDisplay/blob/main/Media/Cistercian%20Display%20ISO.png) 20 | ![display3D](https://github.com/JosueAGtz/CistercianDisplay/blob/main/Media/Cistercian%20Display.png) 21 | 22 | ## Cistercian Display Schematic 23 | ![displayRGBSCH](https://github.com/JosueAGtz/cistercianDisplay/blob/main/Media/RGB%20Cistercian%20Display%20Sch.png?raw=true) 24 | ![displaySCH](https://github.com/JosueAGtz/CistercianDisplay/blob/main/Media/CistercianSch.png) 25 | --------------------------------------------------------------------------------