spoonsphere
Posts: 4
Joined: Sun Oct 13, 2013 4:33 am

Creating a Visual "Circle" Timer using the Raspberry Pi

Thu Jun 26, 2014 12:01 pm

Hello!

I would like to use the Raspberry Pi to create a countdown timer.

I know this has been done before, and I have a simple Python script that counts down and displays the remaining time at a specified interval.

Rather than simply printing the remaining time, what I would like to do is render a circular timer - like a circular pie. And this is where I need direction.

The portion of the pie missing is proportional to the amount of time that has elapsed.

The color of the remaining pie can also change as time passes, from shades of green to shades of yellow to shades of red.

The time can be displayed in the upper right hand corner. I can connect the Raspberry Pi to a network and sync time from an NTP server, but it would be great to also add an RTC to the project.

Being able to read and render text from a file would be a nice added feature, but it isn't essential. This is to get the attention of the speaker who isn't paying attention to the fact that the timer has lapsed :).

I am looking at using a 4.3" TFT display and moutning the Raspberry Pi under the desk. That way the speaker doesn't have the distraction of all that clutter.

I would appreciate any help you could provide.

Thanks!

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: Creating a Visual "Circle" Timer using the Raspberry Pi

Mon Jun 30, 2014 10:16 pm

http://www.pygame.org/docs/ref/draw.html is probably what you want. Lots of pygame tutorials if you search for them.

Return to “Other projects”