Pomodore timer!


#1

I am on a roll with the timer code aren’t I?

Actually, I wrote this code a while ago. Its a pomodore timer! This uses the magic button also except it counts for 30 mins about. I actually use this code all the time! For school, for homework. Anything! What it does is after you download it press the magic button and a 30 min timer will set. It will buzz and then flash green every 5 seconds to remind you to focus. After around 30 min it will buzz and then flash blue. To let you know the timer is over. It is really useful for me so I wanted to share it with you guys! LOL I am actually using it RN for homework, which I prolly should get back to :joy: is the code:

void setup() {
  
}

void loop() {
  
}

void button_press(void) {
  LED led;
  Timer timer;
  Buzzer buzzer;
  for (int i = 0; i < 4; i++) {
    timer.pause(1000);
    buzzer.medium_buzz();
  }

  for (int i = 0; i < 4; i++) {
    timer.pause(1000);
    buzzer.long_buzz();
  }

  led.turn_on_all(GREEN);
  timer.pause(500);
  led.turn_off_all();

  for (int i = 0; i < 100; i++) {
    timer.pause(30000);
    led.turn_on_all(GREEN);
    timer.pause(500);
    led.turn_off_all();
  }

  led.turn_on_all(BLUE);
  timer.pause(1000);
  led.turn_off_all();

  for (int i = 0; i < 4; i++) {
    timer.pause(1000);
    buzzer.short_buzz();
  }
}

Pomodoro Timer 💎🤖🍅⏱
#2

Yeah!!! Trying this today.


#3

GENIUS! This might even make me want to do my homework. :joy: