diff --git a/pomodoro_timer.ino b/pomodoro_timer.ino index e3b6154..c78720f 100644 --- a/pomodoro_timer.ino +++ b/pomodoro_timer.ino @@ -2,7 +2,7 @@ #include #define BREAK_TIME 5 -#define WORK_TIME 1 +#define WORK_TIME 25 #define NUM_PIXELS 10 boolean work = false; @@ -19,11 +19,15 @@ void loop() { counter++; if (counter % 6000 == 0) { alert(); - } - } work = !work; + int goal = 0; + if (work) { + goal = 6000 / NUM_PIXELS * WORK_TIME; + } else { + goal = 6000 / NUM_PIXELS * BREAK_TIME; + } // Turn ON all the NeoPixels if (work) { lights(0, 255, 255, 0); @@ -54,7 +58,7 @@ void loop() { delay(200); //bc otherwise it gets triggered multiple times } - if ((work && timer_counter == (WORK_TIME * 6000 / NUM_PIXELS)) || (!work && timer_counter == (BREAK_TIME * 6000 / NUM_PIXELS))) { + if (timer_counter == goal) { CircuitPlayground.setPixelColor(t, 0, 0, 0); timer_counter = 0; t++;