Bin Clock -Test-

Post Reply
Operator
Posts: 138
Joined: Mon May 06, 2013 5:52 am

Bin Clock -Test-

Post by Operator »

Finally some free time to read all the posts
and program again a bit... :)

Code: Select all

REM Bin-Clock:inspired by a Xmas gift
REM 1 col. hours:   0-23 / 6bit
REM 2 col. minutes: 0-59 / 6bit
REM 3 col. seconds: 0-59 / 6bit
REM sB5.6/iPhone4/iOS6.1/ by Operator

FOR i = 5 TO 0 STEP -1
  FIELD "sec"&i TEXT " "&2^i AT 200,240 -(i*40) SIZE 30,30 RO
  FIELD "min"&i TEXT " "&2^i AT 140,240 -(i*40) SIZE 30,30 RO
  FIELD "hou"&i TEXT " "&2^i AT  80,240 -(i*40) SIZE 30,30 RO
NEXT i

LOOP: SLOWDOWN 
FOR i = 0 TO 5
  IF BIT(CURRENT_SECOND(),i) THEN FIELD "sec"&i BACK COLOR 0,1,0 ELSE FIELD "sec"&i BACK COLOR 0,0,0
  IF BIT(CURRENT_MINUTE(),i) THEN FIELD "min"&i BACK COLOR 0,1,0 ELSE FIELD "min"&i BACK COLOR 0,0,0
  IF BIT(CURRENT_HOUR(),i) THEN FIELD "hou"&i BACK COLOR 0,1,0 ELSE FIELD "hou"&i BACK COLOR 0,0,0
NEXT i
GOTO LOOP
Attachments
image.jpg
image.jpg (35.01 KiB) Viewed 2132 times

Joel
Posts: 57
Joined: Fri Jan 15, 2016 1:36 pm
My devices: miniipad
Flag: Germany

Re: Bin Clock -Test-

Post by Joel »

Cool thing... I enjoyed it very much...simple, elegant and efficient code and a lot of fun to look at.
Thanks, Joel

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Bin Clock -Test-

Post by rbytes »

I agree. I love clocks, and Operator, yours is simple yet elegant. It is a little hard for me to keep up with the seconds, but with a little practice I should get faster. :lol:

Thanks for posting it.
The only thing that gets me down is gravity...

Post Reply