A Desktop Python 2.7 Countdown Timer with CircuitPython and PyPortal

Inspired by Phildini’s Python Clock, I wanted to make a desktop version of a Python 2.7 countdown timer for the big event.

My countdown timer matches my mood, with thirteen different themes to choose from 💅.

In Action

Most importantly, the countdown timer had to be written in Python itself. I used CircuitPython and a wifi-enabled Adafruit PyPortal with a touchscreen. The touchscreen allows you to quickly cycle through themes.

Example Theme

A black and white theme with confetti

How?

The PyPortal is a wifi-enabled microcontroller device featuring a 3" capacitive touchscreen and CircuitPython baked in.

It can be programmed with CircuitPython, a variant of Python that can be used to program microcontrollers, originally forked from MicroPython.

I used the Python Extension for Visual Studio Code, along with workspaces for easy development. One workspace allowed me to keep my PyPortal code side-by-side with my local (version controlled!) codebase.

Show Me the Code!

The repository with all the code and setup instructions you’ll need to get your own countdown clock working is available on my GitHub, at https://github.com/nnja/py27_countdown.

Make the Switch

You might be surprised, but Python 3.0 is over ten years old. Python 2.7 support was originally supposed to drop in 2015, but the deadline was extended another 5 years to 2020 to provide ample time to make the switch.

Over the past ten years, maintaining Python 2 has been a strain on core developers, library authors, and other volunteers and open source contributors who make the language great.

As support for Python 2.7 is sunset in 2020, expect major packages to end Python 2.7 support as well such as Tensorflow, PyTest, and many more.

It’s time to say goodbye to the past and look towards the future with support for incredible features you might be missing out on, like f-strings.

If you haven’t started your migration yet, why wait? Don’t procrastinate. At the time of this blog post, you have 183 days left to go.

Originally published at https://www.nnja.io.

--

--

Cloud Developer Advocate @microsoft, software engineer, pythonista, & speaker. Team #emacs. Previously @reddit @meetup @recursecenter. she/her

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nina Zakharenko

Nina Zakharenko

Cloud Developer Advocate @microsoft, software engineer, pythonista, & speaker. Team #emacs. Previously @reddit @meetup @recursecenter. she/her