GithubHelp home page GithubHelp logo

padraigfl / pomodoro Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 8 KB

A pomodoro timer built for BBC MicroBit v2 with no additional components

Home Page: https://padraigfl.github.io/pomodoro/

Ruby 0.55% Makefile 0.52% TypeScript 98.93%
bbc-microbit microbit pomodoro makecode

pomodoro's Introduction

Open this page at https://padraigfl.github.io/pomodoro/

BBC MicroBit Pomodoro experiment

As the device has a very basic UI and a sound module I figured it had decent potential as a Pomodoro timer and posed an interesting UI challenge in terms of conveying information.

Controls

Currently:

  • A button: begins timer
  • B button: stops timer

Planned:

Default Behaviour

  • A button: begins/resumes timer
  • B button: pauses timer
  • B button + Button: stops timer
  • A + B (for reverse functionality): opens config

Menu Behaviour (sets Work, Break, Long break and Cycle length in order)

  • A button: add + 1 to current value (max 25 for first three, 9 for cycle)
  • B button: confirm setting

UI

Minutes are represented by one LED,

Work periods are displayed from top of screen, eg.

#####
#####
####.
.....
.....

Breaks are displayed from the bottom of the screen, eg.

.....
.....
.....
....#
#####

Cycle stage is displayed via a number, eg

..#..
.##..
..#..
..#..
.###.

UI loops through the following screens every 4 seconds:

  • current minutes remaining
  • total minutes in current storage, dimmed LED
  • current part of cycle
  • total parts in cycle, dimmed LED

Goals

  • Basic pomodoro functionality with representative within device constraint
  • Accurate timing (within a few seconds of accuracy via the input.runningTime() function)
  • Sound effects on state changes
  • Pause/Stop/Resume functionaly
  • UI displays current settings on launch
  • Ability to input specific times for work and breaks prior to starting
  • ~ Ability to save inputted times ~
  • ~ Ability to resume from current location (within a 1 minute range) in case of power failure~
  • Work on MicroBit v1 without sound (needs testing)

Issues encountered

Writing to the internal storage is not achievable via MakeCode so a rewrite in MicroPython is required. I will initially write the menu UIs in MakeCode and that can then be cross referenced with the MicroPython code which should be largely the same

The TypeScript compiler had some issues with some things I tried to do (in particular enum values) so I decided to work around it for now.

To edit this repository in MakeCode.

Blocks preview

This image shows the blocks code from the last commit in master. This image may take a few minutes to refresh.

A rendered view of the blocks

Metadata (used for search, rendering)

  • for PXT/microbit
<script src="https://makecode.com/gh-pages-embed.js"></script><script>makeCodeRender("{{ site.makecode.home_url }}", "{{ site.github.owner_name }}/{{ site.github.repository_name }}");</script>

pomodoro's People

Contributors

padraigfl avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.