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: README.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,22 +47,23 @@ The alarm is always shown in 24h format so you can tell AM from PM.
47
47
48
48
This feature can count down (timer) or up (chrono) to 100 hours. When idle, it displays `0` (or `000000` if you have leading zeros enabled).
49
49
50
-
* To start and stop, use**Up**. While at `0`, this will start the chrono.
50
+
* To start and stop, press**Up**. While at `0`, this will start the chrono.
51
51
* While the chrono is running, **Down** will briefly display a lap time.
52
-
* To set the timer, hold **Select** while at `0`. It will prompt for hours/minutes first, then seconds. For convenience, it will recall the last-used time. Once the timer is set, use**Up** to start it.
52
+
* To set the timer, hold **Select** while at `0`. It will prompt for hours/minutes first, then seconds. For convenience, it will recall the last-used time. Once the timer is set, press**Up** to start it.
53
53
* While the timer is running, **Down** will cycle through the runout options (what the timer will do when it runs out – clocks with beeper only):
54
54
* 1 beep: simply stop, with a long signal (default)
55
55
* 2 beeps: restart, with a short signal (makes a great interval timer!)
56
56
* 3 beeps: start the chrono, with a long signal
57
57
* 4 beeps: start the chrono, with a short signal
58
+
* To reset the timer to the last-used time, press **Down** while stopped.
58
59
* To reset to `0`, hold **Select**.
59
60
* It will automatically reset if you switch to a different function while it’s stopped, if it’s left stopped for an hour, if the chrono reaches 100 hours, or if power is lost. However, you can switch functions while it’s running, and it will continue to run in the background.
60
61
* When the timer signal sounds, press any button to silence it.
61
62
62
63
Some variations may apply, depending on your [hardware configuration](#hardware-configuration):
63
64
64
-
* If your clock has a switched relay and the timer/chrono is set to use it (in the [options menu](#options-menu)), it will switch on while the timer/chrono is running, like the “sleep” function on a clock radio.
65
-
* If your clock does not have a beeper, the runout options are not available.
65
+
* If your clock has a switched relay and the timer/chrono is set to use it (in the [options menu](#options-menu)), it will switch on while the timer is running, like the “sleep” function on a clock radio. The runout options will still work, but won’t signal.
66
+
* If your clock does not have a beeper, the runout options cannot be set.
66
67
* If your clock uses a rotary encoder for **Up/Down** rather than buttons, the controls are slightly different:
67
68
* To start, use **Up**.
68
69
* While the chrono is running, **Up** will briefly display a lap time.
signalPattern = ((timerState>>2)&3)+1; //convert 00/01/10/11 to 1/2/3/4
1159
-
signalSource = fnIsTimer;
1169
+
signalSource = fnIsTimer;//we'll get the piezo pitch even if timer isn't using it
1160
1170
signalStart(-1,0); //Play pulse using above pattern and source
1161
1171
}
1162
1172
}
@@ -1708,7 +1718,8 @@ void signalStart(byte sigFn, byte sigDur){ //make some noise! or switch on an ap
1708
1718
// or 0 for a single pulse as applicable (i.e. skipped in radio mode).
1709
1719
//Special case: if sigFn==fnIsAlarm, and sigDur>0, we'll use signalDur or switchDur as appropriate.
1710
1720
//If sigFn is given as -1 (255), we will use both the existing signalSource and signalPattern for purposes of configs and fibonacci.
1711
-
signalStop(); //if there is a signal going per the current signalSource, stop it - can only have one signal at a time
1721
+
if(!(sigFn==255 && signalSource==fnIsTimer)) signalStop(); // if there is a signal going per the current signalSource, stop it - can only have one signal at a time – except if this is a forced fnIsTimer signal (for signaling runout options) which is cool to overlap timer sleep
1722
+
//except if this is a forced
1712
1723
if(sigFn!=255) signalSource = sigFn;
1713
1724
if(sigFn!=255) signalPattern = (
1714
1725
(signalSource==fnIsTime && readEEPROM(21,false)==2)? -1: //special case: the pips
@@ -1723,25 +1734,24 @@ void signalStart(byte sigFn, byte sigDur){ //make some noise! or switch on an ap
1723
1734
// Serial.print(F(", pattern="));
1724
1735
// Serial.print(signalPattern,DEC);
1725
1736
// Serial.println();
1726
-
if(sigDur==0){ //single pulse
1727
-
//not adding any time to signalRemain
1728
-
signalPulseStartTime = ms();
1729
-
signalPulseStep = 1;
1730
-
//cycleSignal will pick up from here
1731
-
}
1732
-
else { //long-duration signal (alarm, sleep, etc)
1733
-
if(getSignalOutput()==1 && relayPin>=0 && relayMode==0) { //switched relay: turn it on now
1737
+
1738
+
//Set up for a single pulse - no signalRemain
1739
+
signalPulseStartTime = ms();
1740
+
signalPulseStep = 1;
1741
+
if(sigDur!=0){ //long-duration signal (alarm, sleep, etc)
1742
+
//If switched relay, except if this is a forced fnIsTimer signal (for signaling runout options)
1743
+
if(getSignalOutput()==1 && relayPin>=0 && relayMode==0 && !(sigFn==255 && signalSource==fnIsTimer)) { //turn it on now
Copy file name to clipboardExpand all lines: arduino-nixie/configs/v8c-6tube-top-relay.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ const byte relayMode = 0; //If relay is equipped, what does it do?
41
41
// 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.
42
42
// 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.
43
43
constwordsignalDur=180; //sec - when pulsed signal is going, pulses are sent once/sec for this period (e.g. 180 = 3min)
44
-
constwordswitchDur=7200; //sec - when alarm triggers switched relay, it's switched on for this period (e.g. 7200 = 2hr)
44
+
constwordswitchDur=30; //7200; //sec - when alarm triggers switched relay, it's switched on for this period (e.g. 7200 = 2hr)
45
45
constwordpiezoPulse=250; //ms - used with piezo via tone()
46
46
constwordrelayPulse=200; //ms - used with pulsed relay
0 commit comments