Jump to content

7 Segment Clock (IRL time)


Scriding
 Share

Recommended Posts

PRaj4f1.png

This is a clock that displays the time IRL.  It uses a program I made to grab the time and spit it out in a 7 segment display.  I have it showing 12 hour format EST but you can change the program slightly to get any timezone and/or 24 hour format.  

 

 

hnOBcPj.png

I am using pistons but you can hook it up to lights such as Project-Red Lamps if you don't want the piston noise.  Use Rednet cables and copy the layout with the same colors on each side.  You can scale it up by adding more blocks for each color/segment.  

 

 

9y2yAqD.png

Do the same for both sides with the same layout and colors.  Connect them to an Advanced Computer on the right and left sides (with the computer facing the front of the display).

 

 

LVOe11n.png

Open up the Computer and type:

pastebin get 4nRg9CHU json          (this downloads the API used in the program)

 

 

48vnpwE.png

Next, type: 

pastebin get 2DNvbwUA startup

You should now have a working clock in 12 hour EST format. 

 

 

am58WTk.jpg

In order to change the time zone, go to http://worldtimeapi.org/timezone/ and click on your timezone. 

Click on the JSON link (as circled in red) and copy the URL.

 

 

zBefam4.png

Edit the startup program and paste the URL in the http.request("    ")

Save the program and restart.  You should now have changed the timezone.

 

rdv9LZj.png

In order to get the time in 24 hour format, comment out or delete the 3 lines at the top of the picture.  

 

 

SfgN4Vd.png

To get the blinking colon in the middle I used a simple timer with a Programmable Rednet Controller.  Use rednet cables on the white channel connected to the top of it.

Copy the settings in the picture.

 

 

 

 

Feel free to message me in game or on discord if you have any problems.

Here are links to everything:

https://imgur.com/a/POPo5ze

https://pastebin.com/4nRg9CHU

https://pastebin.com/2DNvbwUA

http://worldtimeapi.org/timezone/

 

Link to comment
Share on other sites

  • 9 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Guidelines.