Njegomir Skola
Published © GPL3+

Pomodoro Timer

The Pomodoro technique is a time management method. The technique uses a timer (work for 25 minutes, rest for 5, and so on).

BeginnerShowcase (no instructions)1 hour596
Pomodoro Timer

Things used in this project

Hardware components

BBC micro:bit board
BBC micro:bit board
×1
crocodile clips
×2
Sonos speakers
Sonos speakers
or any other ways to output music
×1

Software apps and online services

pxt.microbit.org
micro:bit pxt.microbit.org

Story

Read more

Schematics

block coding

Code

Pomodoro Timer

JavaScript
Children may use block coding
let minut = 0
input.onButtonPressed(Button.A, () => {
    minut = 0
    basic.showString("Start")
    for (let i = 0; i < 3; i++) {
        for (let i = 0; i < 25; i++) {
            for (let i = 0; i < 60; i++) {
                basic.pause(1000)
            }
            minut += 1
            basic.showNumber(minut)
        }
        music.playTone(294, music.beat(BeatFraction.Double))
        basic.showString("Pause 5min")
        for (let i = 0; i < 5; i++) {
            for (let i = 0; i < 60; i++) {
                basic.pause(1000)
            }
        }
        music.playTone(247, music.beat(BeatFraction.Double))
        basic.showString("Pause Finised")
    }
    for (let i = 0; i < 25; i++) {
        for (let i = 0; i < 60; i++) {
            basic.pause(1000)
        }
    }
    music.playTone(294, music.beat(BeatFraction.Double))
    basic.showString("Pause 15 min")
    for (let i = 0; i < 15; i++) {
        for (let i = 0; i < 60; i++) {
            basic.pause(1000)
        }
    }
    basic.showString("Pause Finised")
})

Credits

Njegomir Skola

Njegomir Skola

1 project • 2 followers
Teacher in secondary school.

Comments