DEV Community

Cover image for A Desktop Python 2.7 Countdown Timer with CircuitPython and PyPortal
𝙽𝚒𝚗𝚊 𝚉𝚊𝚔𝚑𝚊𝚛𝚎𝚗𝚔𝚘 💜🐍
𝙽𝚒𝚗𝚊 𝚉𝚊𝚔𝚑𝚊𝚛𝚎𝚗𝚔𝚘 💜🐍

Posted on • Originally published at nnja.io

A Desktop Python 2.7 Countdown Timer with CircuitPython and PyPortal

✨Did you know that Python 2.7 won't be maintained after January 1st, 2020? ✨

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

The PyPortal Python 2.7 Countdown Clock 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.

Theme Examples

A Snek Theme

An Elegant Black and White Theme

How?

The PyPortal is an 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.

GitHub logo nnja / py27_countdown

PyPortal Python 2.7 Desktop Countdown Clock

Python 2.7 Desktop Countdown Timer with PyPortal + CircuitPython

🐍 ✨Python 2.7 will not be maintained after 2020.✨

⏲ Eagerly awaiting Python 2.7's retirement? Use an Adafruit PyPortal to display a countdown timer to the big event on your desktop.

💅 Thirteen themes let you match your countdown timer to your mood. Select your theme by pressing the left and right sides of the touchscreen.

💜 Written by Nina Zakharenko. Stay in touch:

📺 in action!

in-action

Table of Contents

About PyPortal and CircuitPython

This code is meant to run on a PyPortal.

An Adafruit PyPortal is an 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…

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 169 days left to go.

Top comments (0)