Browse Search Popular Register Upload Rules User list Login:
Search:
Digital Clock (Version 2)

Image:
screenshot of the scene

Author: JustBurn

Group: Default

Filesize: 33.84 kB

Date added: 2009-06-22

Rating: 8.4

Downloads: 8080

Views: 5277

Comments: 18

Ratings: 23

Times favored: 2

Made with: Phun

Tags:

Scene tag

This digital clock use thyme to control the segments display and count the time.

Improved version over my first Digital Clock.

Press "1" to increment the hours, "2" to increment the minutes, "9" to start or stop the timer. If you hold "0" you can see the seconds.

Notes:
. Unlike my first version, the clock is stopped after you load up the scene, press "9" to start the clock.
. I've remapped the keys so it doesn't conflict with the Phun tools' key shortcuts.
. The seconds counter is reset if you increment the minutes.
. In case the simulation goes too slow, go to "File -> New Scene" to clean up and "File -> Load Scene..." to load this scene again.

Have phun! ;)

Extras (can be changed anytime in the console):

scene.my.ledon - Color when the LEDs are lit (Default: [0.4, 1.0, 0.4, 1.0] )
scene.my.ledoff - Color when the LEDs are off. (Default: [0.0, 0.25, 0.0, 1.0] )
scene.my.ledbg - Color of the LEDs display background. (Default: {scene.my.ledoff} )
scene.my.secs - Get/Set seconds counter
scene.my.mins - Get/Set minutes counter
scene.my.hours - Get/Set hours counter
scene.my.viewsecs - 0 = Hours:Mins, 1 = Mins.Secs
scene.my.count_dir - 0 = Count Up, 1 = Count Down, 2 = Don't count
scene.my.blinkingdots - 0 = Dots are always lit, 1 = Blink per second.
scene.my.hook_counter - Code that is called per second ( yep, you can hook your own code! ).

Note:
if you modify scene.my.secs, scene.my.mins, scene.my.hours or scene.my.viewsecs in the console, the changes will only be visible after 1 clock count ( ok, ok, you can call scene.my.disp_refresh if you want:P ).
The View Secs switch (Key "0") will override scene.my.viewsecs .

Example, 12 hours clock:
-----------------------------------

scene.my.hook_counter = {
scene.my.hours >= 12 ? {scene.my.hours = 0} : {};
}

Example, count down:
-------------------------------

Set the number of minutes (you can do this by starting the simulation and press "2" to increment the minutes).

scene.my.count_dir = 1;

scene.my.hook_counter = {
scene.my.viewsecs = 1;
scene.my.hours == 0 && scene.my.mins == 0 && scene.my.secs == 0 ? {
scene.my.count_dir = 2;
scene.my.blinkingdots = 0;
} : {};
}
Please log in to rate this scene
edit
Similar scenes
Title: Digital Clock
Rating: 5
Filesize: 14.28 kB
Downloads: 743
Comments: 0
Ratings: 1
Date added: 2016/12/10 18:49:11
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Clock
Rating: 4.5
Filesize: 33.24 kB
Downloads: 711
Comments: 3
Ratings: 2
Date added: 2008/10/28 03:25:23
Made with: Phun
Rating: rated 4.5
download
Title: Not Quite Finished Clock
Rating: 5.625
Filesize: 58.55 kB
Downloads: 332
Comments: 1
Ratings: 2
Date added: 2010/12/16 05:34:46
Made with: Algodoo before v1.8.5
Rating: rated 5.6
download
Title: Digital Clock
Rating: 5
Filesize: 52.23 kB
Downloads: 542
Comments: 2
Ratings: 1
Date added: 2014/04/28 00:22:25
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Digital Clock (Version 1)
Rating: 5.625
Filesize: 55.86 kB
Downloads: 1336
Comments: 2
Ratings: 2
Date added: 2009/06/22 00:45:01
Made with: Phun
Rating: rated 5.6
download
Title: Digital Counter
Rating: 5
Filesize: 39.12 kB
Downloads: 767
Comments: 1
Ratings: 1
Date added: 2019/05/14 17:41:55
Made with: Algodoo v2.1.0
Rating: rated 5
download
This scene is a response to:
Title Author Rating Downloads Comments Date added
Digital Clock (Version 1) JustBurn 5.6 (2 votes) 1336 2 2009/06/22 00:45:01
show grid
What is thyme?
And how do you use it?
awesome, 10/10
And DAS69, thyme is a programming language used in phun.
You can use it to simple modify you scene or to make awesome things, like this clock :lol:
very cool
Good job. 9/10
New rival for my calculator!
10/10:)
100/10 great:tup: :tup: but did you bought the program?:s
Yes, very good, that must have taken awile!

of course 10/10
it's really boring, you know
wow!:o OMG awsome!:lol: its really like a real one! 10/10:lol:
Thanks everyone for the positive comments :)

Kilinich: I've tried your calculator and it's awesome:lol:

25fara5: What you mean "bought the program" ?:s
Last edited at 2009/06/29 05:03:20 by JustBurn
This clock is awesome
Very cool! But I'm losing something: where is the rest of the programming? I only see a part in oncollide. : For example, you are using scene.my.digitx to tell if a led is on or off, but, where the hell do scene.my.digit get set ???
Last edited at 2009/08/07 00:38:48 by Antotabo
You are a genious
thats just fucking awesome
100000000000000000000000000000000000000000­00000/10:tup: :tup: :tup: :tup:
Coooooooooooooolllllll
1000/100000000000000
Totaly awesome man !! nice job ! :D
score









1000000000000000000000000000000000000000­00000000000000000000000000000000000000000000000000­00000000000000000000000000000000000000000000000000­00000000000000000000000000000000000000000000000000­00000000000000000000/10:tup: :tup: :tup: :tup: :tup: