Skip to content

Commit 5b0bdf5

Browse files
committed
Remove libraries supporting rotary encoder, in preparation for applying a license
1 parent fac650d commit 5b0bdf5

File tree

2 files changed

+9
-26
lines changed

2 files changed

+9
-26
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![Nixie clocks](https://i.imgur.com/FemMWax.jpg)
44

5-
**A digital clock with perpetual calendar, alarm, countdown timer/appliance timer, and day counter.** Written for the Arduino Nano at the heart of [RLB Designs'](http://rlb-designs.com/) Universal Nixie Driver Board (UNDB) v5.0, featuring a DS3231 real-time clock, and driving up to 6 digits multiplexed in pairs via two SN74141 driver chips.
5+
**A digital clock with perpetual calendar, alarm, countdown timer/appliance timer, and day counter.** Written for the Arduino Nano at the heart of [RLB Designs'](http://rlb-designs.com/) Universal Nixie Driver Board (UNDB), featuring a DS3231 real-time clock, and driving up to 6 digits multiplexed in pairs via two SN74141 driver chips.
66

77
[The latest release can be downloaded here.](https://github.com/clockspot/arduino-nixie/releases/latest) Skip to [Hardware Configuration](#hardware-configuration) for details on how to tweak the sketch.
88

@@ -67,7 +67,7 @@ A number of hardware-related settings are specified in consts at the top of the
6767
* **How many tubes** in the display module. Default is 6; small display adjustments are made for 4-tube clocks.
6868
* **Which functions** are enabled. Default is all but temperature and tube tester.
6969
* **Which input pins** are associated with the Select and Adjust controls.
70-
* **What type of Adjust controls** are equipped: pushbuttons (default) or rotary encoders.
70+
* **What type of Adjust controls** are equipped: pushbuttons (default) or rotary encoder (unimplemented).
7171
* **What type of signal outputs** are equipped: a piezo beeper (default) and/or a relay.
7272
* **Signal duration** (default 3min) and **piezo pulse duration** (default 500ms)
7373
* If relay is equipped, **relay mode**:

sixtube_lm/sixtube_lm.ino

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
// based on original sketch by Robin Birtles (rlb-designs.com) and Chris Gerekos
55
// based on http://arduinix.com/Main/Code/ANX-6Tube-Clock-Crossfade.txt
66

7-
#include <EEPROM.h>
8-
#include <DS3231.h>
9-
#include <Wire.h>
10-
#include <ooPinChangeInt.h>
11-
#include <AdaEncoder.h>
7+
#include <EEPROM.h> //Arduino - GNU LPGL
8+
#include <Wire.h> //Arduino - GNU LPGL
9+
#include <DS3231.h> //NorthernWidget - The Unlicense
1210

1311

1412
////////// Hardware configuration consts //////////
@@ -43,7 +41,7 @@ const byte mainAdjDn = A0;
4341
const byte altSel = 0; //alt select button - if unequipped, set to 0
4442

4543
// What type of adj controls are equipped?
46-
// 1 = momentary buttons. 2 = quadrature rotary encoder.
44+
// 1 = momentary buttons. 2 = quadrature rotary encoder (not supported presently)
4745
const byte mainAdjType = 1;
4846

4947
// In normal running mode, what do the controls do?
@@ -246,7 +244,7 @@ void initInputs(){
246244
pinMode(A6, INPUT); digitalWrite(A6, HIGH);
247245
pinMode(A7, INPUT); digitalWrite(A7, HIGH);
248246
//rotary encoder init
249-
if(mainAdjType==2) AdaEncoder mainRot = AdaEncoder('a',mainAdjUp,mainAdjDn);
247+
//TODO encoder support
250248
}
251249

252250
void checkInputs(){
@@ -255,7 +253,7 @@ void checkInputs(){
255253
//check button states
256254
checkBtn(mainSel); //main select
257255
if(mainAdjType==1) { checkBtn(mainAdjUp); checkBtn(mainAdjDn); } //if mainAdj is buttons
258-
if(mainAdjType==2) checkRot(); //if mainAdj is rotary encoder
256+
//if(mainAdjType==2) checkRot(); //if mainAdj is rotary encoder TODO encoder support
259257
if(altSel!=0) checkBtn(altSel); //alt select (if equipped)
260258
}
261259

@@ -297,22 +295,7 @@ void btnStop(){
297295

298296
void checkRot(){
299297
//Changes in rotary encoder. When rotation(s) occur, will call ctrlEvt to simulate btn presses.
300-
if(btnCur==0) {
301-
//https://github.com/GreyGnome/AdaEncoder/blob/master/Examples/MyEncoder/MyEncoder.ino
302-
AdaEncoder *thisEncoder=NULL;
303-
thisEncoder = AdaEncoder::genie();
304-
if(thisEncoder!=NULL) {
305-
unsigned long inputThis = millis();
306-
if(inputThis-inputLast < 70) return; //ignore inputs that come faster than a human could rotate
307-
int8_t clicks = thisEncoder->query(); //signed number of clicks it has moved
308-
byte dir = (clicks<0?0:1);
309-
clicks = abs(clicks);
310-
for(byte i=0; i<clicks; i++){ //in case of more than one click
311-
ctrlEvt((dir?mainAdjUp:mainAdjDn),1);
312-
}
313-
inputLast2 = inputLast; inputLast = inputThis;
314-
}
315-
}
298+
//TODO rotary encoder support
316299
}//end checkRot
317300

318301

0 commit comments

Comments
 (0)