• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

Make a Binary Clock...?

Around the internet I see all different programs that have the time in BINARY format using "drawn" diodes or whatever... Anyway, I was wondering how I might make my own BINARY clock?

Thanx!
0
EmotionSickness
Asked:
EmotionSickness
1 Solution
 
Tommy HuiEngineerCommented:
You have basically three choices:

1. Draw the diodes yourself using the graphics API. This requires the most amount of work.

2. Get the bitmaps for the numbers from the Internet. Then you can use the bitmap control to display the numbers.

3. Get the font from the Internet. Then you can use the font in a text control.
0
 
EmotionSicknessAuthor Commented:
Really no affence but duh...

What I want to know is HOW DO I CONVERT NORMAL TIME TO BINARY TIME?
0
 
smeggheadCommented:
What do you mean by binary ?? can you give an example ??

ThisTime = format$(now,"hh:mm")
will give 08:16

Do you mean analogue ?? i.e. with a big hand and a little hand ???

I cannot imagine a binary clock, binary implies two (bi) state, so it would either be time for a beer or time for a ..nother beer !!
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
simonsabinCommented:
What about sex, that has to be the other time.


0
 
EmotionSicknessAuthor Commented:
Binary is basically when patterns of little lights or dots represent the time (or a timer or something).

This is a Shareware binary clock program I found as an example.
 
http://members.home.com/darkeclipse/files/binclock.exe

or

If you just want a picture to get the "rough" idea, http://members.home.com/darkeclipse/files/bc2scrn.gif

And it was time for a beer or three a LONG time ago for me.  AND i'm not even gonna get into my problems (actually her problems... :| ) with "simonsabin"'s OTHER TIME that he mentioned...  Oh hell, you didn't need to hear that.
0
 
caraf_gCommented:
EmotionSickness,

No offence either, but if you ask a vague question, don't get snotty if you don't get the right answer.

Yep. We would need an explanation of what exactly a binary clock is.

On the other hand though, it shouldn't really matter that much.

Take any Date/Time value - e.g. the value "Now"

You can move this to a double, and remove the integer part:

Dim dblNow As Double

dblNow = Now
dblNow = dblNow - Int(dblNow)

Now you have the current time expressed as a fraction of a day. E.g. 06:00 would be 0.25, 12:00 would be 0.5 and 18:00 would be 0.75

You can now convert this to any format you like. Want to divide the day into 7 hours of 43 minutes each?

dblHr7 As Double
intHr7 As Integer
dblMn43 As Double
intMn43 As Integer

dblHr7 = 7 * dblNow
intHr7 = int(dblHr7)

dblMn43 = dblHr7 - intHr7
dblMn43 = dblMn43 * 43
intMn43 = int(dblMn43)

MsgBox "Current time in the 7Hour43Minute system = " & CStr(intHr7) & ":" & CStr(intMn43)

I still have no idea what you mean by your "binary" system, but hopefully the above should give you an inkling on how to solve your problem.

G'luck

0
 
caraf_gCommented:
Sorry, crossed wires there - I see my comment was completely off the mark too... sorry!
0
 
caraf_gCommented:
Ok - got the solution.

If you look at each column of 4 "diodes", you'll see that the bottom one = 1, the next one up = 2, the next one = 4, and the last one = 8.

So, looking at your example .gif, which shows the time 05:12:26, the lights are as follows:

Column 01 - "0" - All diodes are off
Column 02 - "5" - Diodes 1 and 3, corresponding with 1 + 4 = 5
Column 03 - "1" - Diode 1
Column 04 = "2" - Diode 2
Column 05 = "2" - Diode 2
Column 06 = "6" - Diodes 2 and 3, i.e. 2 + 4 = 6.

So, for each digit, convert to binary as follows
0 = 0000
1 = 0001
2 = 0010
3 = 0011
4 = 0100
5 = 0101
6 = 0110
7 = 0111
8 = 1000
9 = 1001
and set the diodes in the column accordingly.

0
 
EmotionSicknessAuthor Commented:
Whoa damn... Took me awhile but I finished a program that tells the time in Binary! Thanks alot for your help.  Obviously cause I rushed it, the program's not pretty and I was using Command buttons for the lights, but if anyone would like to see a picture of what I ended up with. --- http://members.home.com/darkeclipse/files/binclock.zip (2.15 Kb)

Sorry it's in BMP format, too lazy to convert it, but not too lazy as to not atleast zip it or something.

Thanx again!
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now