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
Copy file name to clipboardExpand all lines: sixtube_lm/sixtube_lm.ino
+23-1Lines changed: 23 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,7 @@ const char mainAdjFn = -1;
57
57
// const byte altSelFn = -1;
58
58
// const byte altAdjFn = -1;
59
59
60
+
///////TODO SEARCH FOR THESE ////////////////
60
61
const byte signalPin = 10;
61
62
const byte signalType = 0; //What is the signal pin connected to?
62
63
// 0 = Piezo. When alarm and timer go off, it will output a beep pattern with tone() for signalDur seconds.
@@ -66,12 +67,30 @@ const word signalDur = 180; //Per above. Use e.g. 180 secs (3min) for signalType
66
67
const word signalBeepDur = 500; //With signalType 0/1, "beeps" happen once per second; how long is each beep in ms?
67
68
//Particularly when driving a solenoid with signalType 1, this should be set to a comfortable activation duration for the solenoid.
68
69
70
+
//What are the signal pin(s) connected to?
71
+
constchar piezoPin = 10;
72
+
constchar relayPin = -1;
73
+
//If running a v5.0 board with only a piezo output, leave these set to 10 and -1 (disabled) respectively - unless removing the piezo to drive a relay instead, in which case, reverse them.
74
+
//If running a v5.x board, piezo is 10, relay is X.
75
+
const byte relayMode = 0; //what does the relay pin do?
76
+
//0 = switch (for e.g. appliance/radio) - see switchDur
77
+
//1 = pulses (for e.g. solenoid) - see relayPulse
78
+
const word signalDur = 180; //sec - when alarm or timer go off (piezo or relay pulse), pulses are sent once/sec for this many seconds (e.g. 180 = 3min)
79
+
const word switchDur = 7200; //sec - when alarm goes off (relay switch), relay is switched for this many seconds (e.g. 7200 = 2hr)
80
+
const word piezoPulse = 500; //ms - used with tone()
81
+
const word relayPulse = 200; //ms - for pulsing e.g. a solenoid
82
+
//If both piezo and relay are equipped, you get these extra menu options:
83
+
//alarm signal: 0: piezo, 1: relay (pulse or switch for wake)
84
+
//timer mode: 0: countdown and stop, 1: countdown and restart (interval timer)
85
+
//timer signal: 0: piezo, 1: relay (pulse or switch for sleep)
86
+
//strike signal (if relayMode is pulse): 0: piezo, 1: relay pulse
87
+
69
88
const byte enableSoftAlarmSwitch = 1;
70
89
// 1 = yes (normal). Alarm can be switched on and off when clock is displaying the alarm time (fnIsAlarm).
71
90
// 0 = no. Alarm will be permanently on. Use with signalType=2 if the connected device has its own switch.
72
91
const byte enableSoftPowerSwitch = 0;
73
92
// 0 = no (normal).
74
-
// 1 = yes. If signalType=2, this allows the relay to be switched on and off 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 an old clock radio of the type where the clock does all the switching.
93
+
// 1 = yes. If relay equipped in switch mode, this allows the relay to 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 an old clock radio of the type where the clock does all the switching.
75
94
76
95
const byte unoffDur = 10; //when display is dim/off, a press will light the tubes for this many seconds
77
96
@@ -129,6 +148,9 @@ Some are skipped when they wouldn't apply to a given clock's hardware config; se
129
148
39 Alarm tone pitch - skipped when signalType!=0
130
149
40 Timer tone pitch - skipped when signalType!=0
131
150
41 Hourly strike pitch - skipped when signalType!=0
151
+
42 Alarm signal type - skipped when not both piezo and relay TODO
152
+
43 Timer signal type - ditto TODO
153
+
44 Strike signal type - skip if not relay pulse TODO
132
154
*/
133
155
134
156
//Options menu options' EEPROM locations and default/min/max values.
0 commit comments