Code covered by the BSD License  

Highlights from
Binary Clock

5.0

5.0 | 4 ratings Rate this file 4 Downloads (last 30 days) File Size: 3.1 KB File ID: #14286
image thumbnail

Binary Clock

by Joseph Kirk

 

15 Mar 2007 (Updated 27 Jul 2007)

Displays the clock time in binary representation

Editor's Notes:

This was a File Exchange Pick of the Week

| Watch this File

File Information
Description

Time is displayed as 6 columns of LEDs in the form HH:MM:SS

Thus, the included screenshot image would represent 03:49:27, because:
the first column is 00 binary = 0
the second column is 0011 binary = 3
the third column is 100 binary = 4
the fourth column is 1001 binary = 9
the fifth column is 010 binary = 2
and the sixth column is 0111 binary = 7

For another example, check out the help section of the downloaded file.

Controls:
Use the menus to change the LED color, toggle between military (24-hour) and civilian (12-hour) time, and view the help notes. Shortcut keys work too.

Examples:
>> binclock; % starts the clock with blue LEDs (default)
>> binclock([0 1 0]); % starts the clock with green LEDs
>> binclock(rand(1,3)); % starts the clock with random colored LEDs

MATLAB release MATLAB 7.3 (R2006b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (5)
26 Mar 2007 Mike Briggs

Works nice.

26 Mar 2007 Tim Davis

Fun! I've got the real clock on my desk (my real desk, not my computer desktop). Google "Anelace binary BCD clock" for example. It's fun to watch people puzzle over the display until they figure it out. Now I can do the same on my (computer) desktop. :-)

14 May 2007 Rachel Cobleigh

Very cool clock, nice job!

15 Jun 2007 The Author

Update: I reworked this clock to use nested functions and a timer rather than persistent variables. Now the user doesn't have to close the window to work on other things.

18 Sep 2008 George Bertalan

Bryliant

Please login to add a comment or rating.
Updates
26 Mar 2007

Fixed the spacing for the example in the description

27 Mar 2007

Added capability to toggle between 12-hour (civilian) and 24-hour (military) time, and fixed the description.

28 Mar 2007

Updated the example in the description (for the last time :o)

27 Apr 2007

Simplified m-file code, added comments

27 Apr 2007

Simplified m-file code, added comments

15 Jun 2007

Reworked this clock to use nested functions and a timer. Now the user doesn't have to close the window to work on other things. I also added some menu functions.

27 Jul 2007

Added "custom color" option and defined shortcut keys.

Tag Activity for this File
Tag Applied By Date/Time
clock Joseph Kirk 22 Oct 2008 09:04:34
fun Joseph Kirk 22 Oct 2008 09:04:34
binary clock Joseph Kirk 22 Oct 2008 09:04:34
time Joseph Kirk 22 Oct 2008 09:04:34
columns Joseph Kirk 22 Oct 2008 09:04:34
leds Joseph Kirk 22 Oct 2008 09:04:34
utilities Joseph Kirk 22 Oct 2008 09:04:34
potw Joseph Kirk 16 Mar 2010 14:21:05
pick of the week Jiro Doke 11 Feb 2011 20:15:23

Contact us at files@mathworks.com