Skip to content

Commit 80e2783

Browse files
committed
Refined constants
1 parent 1310178 commit 80e2783

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

hanukiah/hanukiah.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const int shamash = 3; // output pin
2-
const int candles[8] = {4, 5, 6, 7, 8, 9, 10, 11};
3-
const int button = 12; // input pin
1+
const int shamash = 2; // output pin
2+
const int candles[] = {3, 4, 5, 6, 7, 8, 9, 10};
3+
const int button = 11; // input pin
44

55
int night = 0;
66

@@ -42,7 +42,7 @@ void loop() {
4242
started = millis();
4343

4444
// for cheapo debouncing
45-
delay(250);
45+
delay(200);
4646
} else if (millis() - started > ONE_HOUR_MILLIS) {
4747
// Candles go out after an hour
4848
night = 0;
@@ -51,9 +51,9 @@ void loop() {
5151
digitalWrite(candles[i], LOW);
5252
}
5353
} else if (night > 0) {
54-
// Fake flicker a candle
54+
// Fake-flicker a candle
5555
int candle = random(night);
56-
int iters = random(10);
56+
int iters = random(5);
5757
for (int i = 0; i < iters; ++i) {
5858
digitalWrite(candles[candle], LOW);
5959
int offness = random(100);

0 commit comments

Comments
 (0)