Skip to content

Commit f652c2e

Browse files
committed
three v8 configs, initInputs bugfix, remove unimplemented options
1 parent 9348917 commit f652c2e

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ _Note: Many variations are possible, depending on your clock's hardware; but thi
3636
| | **General** | |
3737
| 1 | Time format | 1 = 12-hour<br/>2 = 24-hour<br/>(time-of-day display only; setting times is always done in 24h) |
3838
| 2 | Date format | 1 = month/date/weekday<br/>2 = date/month/weekday<br/>3 = month/date/year<br/>4 = date/month/year<br/>5 = year/month/date<br/>Note that four-tube clocks will display only the first two values in each of these options. |
39-
| 3 | Display date during time? | 0 = never<br/>1 = date instead of seconds<br/>2 = full date (as above) every minute at :30 seconds<br/>3 = same as 2, but scrolls in and out<br/>4 = full date every 5 minutes at :30 seconds<br/>3 = same as 4, but scrolls in and out |
39+
| 3 | Display date during time? | 0 = never<br/>1 = date instead of seconds<br/>2 = full date (as above) every minute at :30 seconds<br/>3 = same as 2, but scrolls in and out<br/>TODO: implement options for full date every 5 minutes |
4040
| 4 | Leading zero in hour, date, and month? | 0 = no<br/>1 = yes |
4141
| 5 | Digit fade | 0–20 (in hundredths of a second) |
4242
| 6 | Auto DST | Add 1h for daylight saving time between these dates (at 2am):<br/>0 = off<br/>1 = second Sunday in March to first Sunday in November (US/CA)<br/>2 = last Sunday in March to last Sunday in October (UK/EU)<br/>3 = first Sunday in April to last Sunday in October (MX)<br/>4 = last Sunday in September to first Sunday in April (NZ)<br/>5 = first Sunday in October to first Sunday in April (AU)<br/>6 = third Sunday in October to third Sunday in February (BZ) |
4343
| 7 | LED behavior | 0 = always off<br/>1 = always on<br/>2 = on, but follow day-off and night-off if enabled<br/>3 = off, but on when alarm/timer sounds</br>4 = off, but on with switched relay (if equipped – great for radios!)<br/>(Clocks with LED control only, UNDB v8+) |
4444
| 8 | Temperature format | 0 = Celsius<br/>1 = Fahrenheit<br/>(Clocks with temperature function enabled only) |
45-
| 9 | Anti-cathode poisoning | Briefly cycles all digits to prevent [cathode poisoning](http://www.tube-tester.com/sites/nixie/different/cathode%20poisoning/cathode-poisoning.htm):<br/>0 = once a day, at "Night ends at" time<br/>1 = once a day, at midnight<br/>2 = every hour, at minute :01<br/>3 = every minute, at second :01 |
45+
| 9 | Anti-cathode poisoning | Briefly cycles all digits to prevent [cathode poisoning](http://www.tube-tester.com/sites/nixie/different/cathode%20poisoning/cathode-poisoning.htm)<br/>TODO: implement this |
4646
| | **Alarm** | |
4747
| 10 | Alarm days | 0 = every day<br/>1 = work week only (per settings below)<br/>2 = weekend only |
4848
| 11 | Alarm signal | 0 = beeper<br/>1 = relay (if in switch mode, will stay on for 2 hours)<br/>(Clocks with both beeper and relay only) |
@@ -59,7 +59,7 @@ _Note: Many variations are possible, depending on your clock's hardware; but thi
5959
| | **Night-off and day-off** | |
6060
| 40 | Night-off | To save tube life and/or preserve your sleep, dim or shut off tubes nightly when you're not around or sleeping.<br/>0 = none (tubes fully on at night)<br/>1 = dim tubes at night<br/>2 = shut off tubes at night<br/>When off, you can press **Select** to illuminate the tubes briefly. |
6161
| 41 | Night starts at | Time of day. |
62-
| 42 | Night ends at | Time of day. Set to 0:00 to use the alarm time. At this time (whether night-off/alarm is enabled or not), all tubes will briefly cycle through all digits at full brightness to help prevent . |
62+
| 42 | Night ends at | Time of day. Set to 0:00 to use the alarm time. |
6363
| 43 | Day-off | To further save tube life, shut off tubes during the day when you're not around.<br/>0 = none (tubes fully on during the day)<br/>1 = clock at work (shut off all day on weekends)<br/>2 = clock at home (shut off during work hours)<br/>When off, you can press **Select** to illuminuate the tubes briefly. |
6464
| 44 | First day of work week | 0–6 (Sunday–Saturday) |
6565
| 45 | Last day of work week | 0–6 (Sunday–Saturday) |

sixtube_lm/sixtube_lm.ino

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
//#include "configs/v5-6tube.h" //UNDB v5, 6 tubes
1212
//#include "configs/v5-6tube-rotary.h" //UNDB v5, 6 tubes, rotary encoder instead of buttons
1313
//#include "configs/v5-4tube.h" //UNDB v5, 4 tubes
14-
#include "configs/v8-6tube-relayswitch.h" //UNDB v8, 6 tubes, switching relay
14+
#include "configs/v8-6tube.h" //UNDB v8 before modification, no LED or relay support
15+
//#include "configs/v8a-6tube-relayswitch.h" //UNDB v8 after modification A (Select=A1, Adj=A6/A7, Alt=A0, LED=A2, Relay=A3)
16+
//#include "configs/v8b-6tube-relayswitch.h" //UNDB v8 after modification A (Select=A6, Adj=A0/A1, Alt=A7, LED=A2, Relay=A3)
1517

1618

1719
////////// Other includes, global consts, and vars //////////
@@ -68,11 +70,11 @@ Some are skipped when they wouldn't apply to a given clock's hardware config, se
6870
//Option numbers/order can be changed (though try to avoid for user convenience);
6971
//but option locs should be maintained so EEPROM doesn't have to be reset after an upgrade.
7072
// General Alarm Timer Strike Night-off and day-off
71-
const byte optsNum[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13, 20,21,22, 30,31,32, 40, 41, 42,43,44,45, 46, 47};
72-
const byte optsLoc[] = {16,17,18,19,20,22,26,45,46, 23,42,39,24, 25,43,40, 21,44,41, 27, 28, 30,32,33,34, 35, 37};
73-
const word optsDef[] = { 2, 1, 0, 0, 5, 0, 1, 0, 0, 0, 0,61, 9, 0, 0,61, 0, 0,61, 0,1320, 360, 0, 1, 5, 480,1020};
74-
const word optsMin[] = { 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,49, 0, 0, 0,49, 0, 0,49, 0, 0, 0, 0, 0, 0, 0, 0};
75-
const word optsMax[] = { 2, 5, 3, 1,20, 6, 4, 1, 3, 2, 1,88,60, 1, 1,88, 4, 1,88, 2,1439,1439, 2, 6, 6,1439,1439};
73+
const byte optsNum[] = { 1, 2, 3, 4, 5, 6, 7, 8, 10,11,12,13, 20,21,22, 30,31,32, 40, 41, 42,43,44,45, 46, 47}; // 9,
74+
const byte optsLoc[] = {16,17,18,19,20,22,26,45, 23,42,39,24, 25,43,40, 21,44,41, 27, 28, 30,32,33,34, 35, 37}; //46,
75+
const word optsDef[] = { 2, 1, 0, 0, 5, 0, 1, 0, 0, 0,61, 9, 0, 0,61, 0, 0,61, 0,1320, 360, 0, 1, 5, 480,1020}; // 0,
76+
const word optsMin[] = { 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,49, 0, 0, 0,49, 0, 0,49, 0, 0, 0, 0, 0, 0, 0, 0}; // 0,
77+
const word optsMax[] = { 2, 5, 3, 1,20, 6, 4, 1, 2, 1,88,60, 1, 1,88, 4, 1,88, 2,1439,1439, 2, 6, 6,1439,1439}; // 3,
7678

7779
//RTC objects
7880
DS3231 ds3231; //an object to access the ds3231 specifically (temp, etc)
@@ -169,10 +171,10 @@ void loop(){
169171

170172
void initInputs(){
171173
//TODO are there no "loose" pins left floating after this? per https://electronics.stackexchange.com/q/37696/151805
172-
pinMode(A0, INPUT_PULLUP);
173-
pinMode(A1, INPUT_PULLUP);
174-
//pinMode(A2, INPUT_PULLUP);
175-
//pinMode(A3, INPUT_PULLUP);
174+
pinMode(mainSel, INPUT_PULLUP);
175+
pinMode(mainAdjUp, INPUT_PULLUP);
176+
pinMode(mainAdjDn, INPUT_PULLUP);
177+
pinMode(altSel, INPUT_PULLUP);
176178
//rotary encoder init
177179
if(mainAdjType==2) AdaEncoder mainRot = AdaEncoder('a',mainAdjUp,mainAdjDn);
178180
}

0 commit comments

Comments
 (0)