GithubHelp home page GithubHelp logo

countdown's Introduction

working time countdown

A working time tracker running on a Raspberry Pi Zero/Zero W, powered by NodeJS and/or Python 3.

time tracker example

How Does It Work

  • once plugged in for the first time, it will start a countdown
  • if unplugged before the countdown is finished, it pauses (will start from that same time next boot)
  • if unplugged after the countdown is finished, it resets itself (will start from scratch next boot/working day)

When Is It Safe To Unplug ?

If the countdown is finished, i.e. the screen is blinking, it's always safe to unplug the Raspberry Pi Zero/W.

However, to pause it, it's best to wait after next minute update, as any filesystem operation would be done by that time.

Theoretically, you must be quite unlucky to unplug it in a breaking way, but don't worry, the code is super defensive about it so that in the worst case scenario you'll just have a timer starting from scratch.

How to reset the timer ?

Just let it reach its end, or SSH into your pi and remove the ~/countdown.json file.

Reboot, and you'll be good to go again.

How To Install

time tracker oled example

These instructions are for the pimoroni b/w Inky pHAT, the Waveshare e-Paper, or the i2c Pi Oled screen.

Prepare a BENJA Raspberry Pi SD card:

bash <(curl -s https://archibold.io/benja/prepare)

Once finished, remove it and put it on your RPi board. Login via alarm user and alarm password and follow instructions until the board reboot.

At that point, when everything is installed and you have a BENJA prompt, type the following in your Raspberry Pi terminal:

DISPLAY=pimoroni
# or DISPLAY=waveshare if you use waveshare
# or DISPLAY=oled if you use i2c oled screen

# run the installer
bash <(curl -s https://webreflection.github.io/countdown/${DISPLAY}/install)

Reboot the board via reboot and see the counter stating.

Raspberry Pi Zero without WiFi

If you want to set it up in a Pi Zero W but use after a Pi Zero instead, remember to disable the network.

netctl list
# read the wlan0 name

sudo netctl disable wlan0-your-SID
sudo systemctl disable dhcpcd

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.