Clock activity

From OLPC
Revision as of 16:02, 2 February 2008 by Genepi (talk | contribs) (Creation of the Clock activity page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Activity-clock.svg

see more templates or propose new


  For the general public

Description & Goals

What time is it?

Summary

The Clock activity aims at two simple goals:

  • As a teaching tool to help children learn how to read time.
  • To give the children a way to know the time it is, with their XO, even they don't earn a watch.

The presentation on screen has been kept simple enough to reach these two objectives.


Current Use & Goals

Click on right button to change display mode.

  • Simpler display
  • With hours numbers
  • Date and day
  • Nice clock face


Other uses

Learn how to find geographical North (or South, depending in which hemisphere you are located) using the clock hands: Findind True North Without a Compass. And from there, build a solar clock!


Screenshots

The basic clock face
The nice clock face


Development

This code is released in Public Domain, so you can do whatever you want with it. This is simple enough that Python learners can try to add or change features. The whole clock code, with many detailed comments, is a 300 lines Python source.

Point of interests:

  • PyGTK events programming, when one clicks on right button.
  • Cairo drawing.
  • Localization. Though a clock face should look quite similar in all cultures, you can adapt the way it displays hours numbers and date.
  • SVG rendering. The nice clock background is the SVG file clock.svg (drawn with Inkscape). You can change it to your liking.


Source

TODO: Find a place where to put it...


Functional Test

  • Open the clock activity.
  • Check that it display the current time of the XO.
  • Click on right button to change clock face display. Display mode loops (simple + hours + day and date + nice clock).
  • Close the activity; ensure that it closes properly.