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
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -189,6 +189,7 @@ void loop(){
189
189
checkRTC(false); //if clock has ticked, decrement timer if running, and updateDisplay
190
190
checkInputs(); //if inputs have changed, this will do things + updateDisplay as needed
191
191
doSetHold(); //if inputs have been held, this will do more things + updateDisplay as needed
192
+
//cycleBellTone(); //if beeper is making a bell tone noise, continue to "animate" its decay TODO
192
193
}
193
194
//Things done every loop cycle
194
195
cycleDisplay(); //keeps the display hardware multiplexing cycle going
@@ -745,6 +746,21 @@ void getHz(byte note){
745
746
//56 = 659.2 E5
746
747
//61 = 880 A5
747
748
}
749
+
//Sometimes we activate the beeper directly (e.g. pips) but most of the time we make a bell tone TODO
750
+
// char curBellToneLevel; //support negative just in case
751
+
// word curBellTonePitch;
752
+
// void cycleBellTone(){
753
+
// //Called by loop() 50ms polling – make bell tone decay
754
+
// //An Arduino pin directly to a piezo element/buzzer is not very good. The piezo is like a capacitor and you need a resistor of 100 ohm to reduce the peak currents.
755
+
// if(curBellToneLevel > 0) {
756
+
// curBellToneLevel *= 0.9; //decay by 1/10 each time
757
+
// if(curBellToneLevel<=0) {
758
+
// currBelToneLevel = 0; //TODO stop tone fully
759
+
// } else {
760
+
// //TODO make the bell this level - whatever it was doing before
0 commit comments