You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// To control which of these display persistently vs. switch back to Time after a few seconds, search "Temporary-display mode timeout"
14
+
15
+
// These are the UNDB v5 board connections to Arduino analog input pins.
16
+
// S1/PL13 = Reset
17
+
// S2/PL5 = A1
18
+
// S3/PL6 = A0
19
+
// S4/PL7 = A6
20
+
// S5/PL8 = A3
21
+
// S6/PL9 = A2
22
+
// S7/PL14 = A7
23
+
// A6-A7 are analog-only pins that aren't quite as responsive and require a physical pullup resistor (1K to +5V), and can't be used with rotary encoders because they don't support pin change interrupts.
24
+
25
+
// What input is associated with each control?
26
+
constbytemainSel=A1; //main select button - must be equipped
27
+
constbytemainAdjUp=A6; //main up/down buttons or rotary encoder - must be equipped
28
+
constbytemainAdjDn=A2;
29
+
constbytealtSel=0; //alt select button - if unequipped, set to 0
// In normal running mode, what do the controls do?
36
+
// -1 = nothing/switch, -2 = cycle through functions, fn in fnsEnabled[] = go to that function
37
+
// If using soft alarm/power switch per below, the control(s) set to -1 will do the switching.
38
+
constcharmainSelFn=-2;
39
+
constcharmainAdjFn=-1;
40
+
constbytealtSelFn=-1;
41
+
42
+
//What are the signal pin(s) connected to?
43
+
constcharpiezoPin=10;
44
+
constcharrelayPin=-1; //don't change - not available until UNDB v8
45
+
constbyterelayMode=0; //don't change - not available until UNDB v8
46
+
constwordsignalDur=180; //sec - when pulsed signal is going, pulses are sent once/sec for this period (e.g. 180 = 3min)
47
+
constwordswitchDur=7200; //sec - when alarm triggers switched relay, it's switched on for this period (e.g. 7200 = 2hr)
48
+
constwordpiezoPulse=500; //ms - used with piezo via tone()
49
+
constwordrelayPulse=200; //ms - used with pulsed relay
50
+
51
+
//Soft power switches
52
+
constbyteenableSoftAlarmSwitch=1;
53
+
// 1 = yes. Alarm can be switched on and off when clock is displaying the alarm time (fnIsAlarm).
54
+
// 0 = no. Alarm will be permanently on. Use with switched relay if the appliance has its own switch on this relay circuit.
55
+
constbyteenableSoftPowerSwitch=0; //don't change - not available until UNDB v8
56
+
57
+
//LED circuit control
58
+
constcharledPin=-1; //don't change - not available until UNDB v8
59
+
60
+
//When display is dim/off, a press will light the tubes for how long?
61
+
constbyteunoffDur=10; //sec
62
+
63
+
// How long (in ms) are the button hold durations?
64
+
constwordbtnShortHold=1000; //for setting the displayed feataure
65
+
constwordbtnLongHold=3000; //for for entering options menu
66
+
constbytevelThreshold=150; //ms
67
+
// When an adj up/down input (btn or rot) follows another in less than this time, value will change more (10 vs 1).
68
+
// Recommend ~150 for rotaries. If you want to use this feature with buttons, extend to ~400.
69
+
70
+
// What is the "frame rate" of the tube cleaning and display scrolling? up to 65535 ms
71
+
constwordcleanSpeed=200; //ms
72
+
constwordscrollSpeed=100; //ms - e.g. scroll-in-and-out date at :30 - to give the illusion of a slow scroll that doesn't pause, use (timeoutTempFn*1000)/(displaySize+1) - e.g. 714 for displaySize=6 and timeoutTempFn=5
73
+
74
+
// What are the timeouts for setting and temporarily-displayed functions? up to 65535 sec
// To control which of these display persistently vs. switch back to Time after a few seconds, search "Temporary-display mode timeout"
14
+
15
+
// These are the RLB board connections to Arduino analog input pins.
16
+
// S1/PL13 = Reset
17
+
// S2/PL5 = A1
18
+
// S3/PL6 = A0
19
+
// S4/PL7 = A6
20
+
// S5/PL8 = A3
21
+
// S6/PL9 = A2
22
+
// S7/PL14 = A7
23
+
// A6-A7 are analog-only pins that aren't quite as responsive and require a physical pullup resistor (1K to +5V), and can't be used with rotary encoders because they don't support pin change interrupts.
24
+
25
+
// What input is associated with each control?
26
+
constbytemainSel=A1; //main select button - must be equipped
27
+
constbytemainAdjUp=A2; //main up/down buttons or rotary encoder - must be equipped
28
+
constbytemainAdjDn=A3;
29
+
constbytealtSel=A0; //alt select button - if unequipped, set to 0
// In normal running mode, what do the controls do?
36
+
// -1 = nothing/switch, -2 = cycle through functions, fn in fnsEnabled[] = go to that function
37
+
// If using soft alarm/power switch per below, the control(s) set to -1 will do the switching.
38
+
constcharmainSelFn=-2;
39
+
constcharmainAdjFn=-1;
40
+
constbytealtSelFn=fnIsAlarm; //go straight to alarm
41
+
42
+
//What are the signal pin(s) connected to?
43
+
constcharpiezoPin=10;
44
+
constcharrelayPin=-1;
45
+
// -1 to disable feature (no relay item equipped); A3 if equipped (UNDB v8)
46
+
constbyterelayMode=0; //If relay is equipped, what does it do?
47
+
// 0 = switched mode: the relay will be switched to control an appliance like a radio or light fixture. If used with timer, it will switch on while timer is running (like a "sleep" function). If used with alarm, it will switch on when alarm trips; specify duration of this in switchDur.
48
+
// 1 = pulsed mode: the relay will be pulsed, like the beeper is, to control an intermittent signaling device like a solenoid or indicator lamp. Specify pulse duration in relayPulse.
49
+
constwordsignalDur=180; //sec - when pulsed signal is going, pulses are sent once/sec for this period (e.g. 180 = 3min)
50
+
constwordswitchDur=7200; //sec - when alarm triggers switched relay, it's switched on for this period (e.g. 7200 = 2hr)
51
+
constwordpiezoPulse=500; //ms - used with piezo via tone()
52
+
constwordrelayPulse=200; //ms - used with pulsed relay
53
+
54
+
//Soft power switches
55
+
constbyteenableSoftAlarmSwitch=1;
56
+
// 1 = yes. Alarm can be switched on and off when clock is displaying the alarm time (fnIsAlarm).
57
+
// 0 = no. Alarm will be permanently on. Use with switched relay if the appliance has its own switch on this relay circuit.
58
+
constbyteenableSoftPowerSwitch=1; //works with switched relay only
59
+
// 1 = yes. Relay can be switched on and off directly when clock is displaying time of day (fnIsTime). This is useful if connecting an appliance (e.g. radio) that doesn't have its own switch, or if replacing the clock unit in a clock radio where the clock does all the switching (e.g. Telechron).
60
+
// 0 = no. Use if the connected appliance has its own power switch (independent of this relay circuit) or does not need to be manually switched.
61
+
62
+
//LED circuit control
63
+
constcharledPin=-1;
64
+
// -1 to disable feature; A2 if equipped (UNDB v8)
65
+
66
+
//When display is dim/off, a press will light the tubes for how long?
67
+
constbyteunoffDur=10; //sec
68
+
69
+
// How long (in ms) are the button hold durations?
70
+
constwordbtnShortHold=1000; //for setting the displayed feataure
71
+
constwordbtnLongHold=3000; //for for entering options menu
72
+
constbytevelThreshold=150; //ms
73
+
// When an adj up/down input (btn or rot) follows another in less than this time, value will change more (10 vs 1).
74
+
// Recommend ~150 for rotaries. If you want to use this feature with buttons, extend to ~400.
75
+
76
+
// What is the "frame rate" of the tube cleaning and display scrolling? up to 65535 ms
77
+
constwordcleanSpeed=200; //ms
78
+
constwordscrollSpeed=100; //ms - e.g. scroll-in-and-out date at :30 - to give the illusion of a slow scroll that doesn't pause, use (timeoutTempFn*1000)/(displaySize+1) - e.g. 714 for displaySize=6 and timeoutTempFn=5
79
+
80
+
// What are the timeouts for setting and temporarily-displayed functions? up to 65535 sec
0 commit comments