1/29/2022

Digital Watch Clock

Put the power of time into your watch. Let’s code up a real digital watch for your micro:bit!

Casio Men's G-Shock Tough Solar Analog & Digital Atomic Watch - AWGM100-1ACR sale $112.00. Casio Men's G-Shock Tough Solar Digital Atomic Watch - GWM500F-2CRK sale $27.99. Armitron Pro Sport Extra Large LCD Digital Watch - 40-8356RED Reg. Timex® Kids' Time Machines Digital Watch - TW7C26000XY. Apple Watch Series 6. 44mm or 40mm case size. Always-On Retina display. GPS + Cellular 1 1 8 7 4 6. Blood Oxygen app 2 2 1 6 10 5. ECG app 3 3 2 7 11 6. High and low heart rate notifications.

Duration: ~20 minutes

Timex Metropolitan S 36mm Silicone Strap Watch. Timex Metropolitan R 42mm Leather and Silicone Strap Watch. TIMEX® IRONMAN® Transit with Timex Pay 40mm Silicone Strap Watch. Q Timex Reissue Digital LCA 32.5mm Stainless Steel Bracelet Watch. April 25, 2017 Digi-Watch 2017-04-25T06:29:24+00:00 Clock Gadgets Do you miss those classic, bedside alarm clocks that displayed time using bright red digital displays? There’s no need to reminisce, because you can reincarnate them with Digi-Watch!

Make the time variables

We need to make some variables to keep track of the time and for a few other things.

  1. Go into Basic in the toolbox and pull an basic:on start on to the workspace.
  2. Ok, in Variables click on Make a Variable. Name the variable as hours. Drag out a variables:set to block and change the name with the dropdown to hours. Place the variable into the basic:on start block.
  3. Repeat this 4 more times to make variables named minutes, time, adjust, and ampm.
  4. Now, for the variables:set to block for time, go to Text and drag a ' ' in and replace the 0.
  5. For the ampm variable, change the 0 there to a false from the Logic category.

Display the time, kind of

So, let’s try showing the time on the display. We aren’t keeping time yet but we’ll just see if we can make our watch show something.

  1. Get in the Input category and pull out an input:on shake . We’ll have our watch show the time when it’s shaken.
  2. Get another variables:set to and put it into the input:on shake . Change the name to time.
  3. Replace the 0 with a text:join from Text. Get another text:join and put it into the second slot of the first text:join you pulled out.
  4. Change the ' ' in the first text:join to the hours variable. Change the text in the first slot of the second text:join to ':'. And, change the last slot in the second text:join to the minutes variable.
  5. Finally, stick in a basic:show string below the variables:set to . Switch the text inside to the variable time.
  6. Download the code to you micro:bit and give it a shake. Did you see the time of “0:0” go by on the LEDs?
Clock

Set the time with buttons

There has to be a way to set the time on your watch. We’ll use the buttons to set the current time. One button is for setting the hours and another button is for the minutes.

Set the hours

Let’s make a way to set the hours for the watch.

  1. In Input, find an input:on button pressed an put it somewhere on the workspace.
  2. Get an logic:if then else block from Logic and put it in the input:on button pressed .
  3. From the same Logic category, get a logic:0 < 0 and replace the true condition with it.
  4. Change the left 0 in the condition to the hours variable. Change 0 on the right to 23. This limits our hour count to 23 hours.
  5. In the logic:then section, put a variables:change by there. Select the hours variable name from the dropdown.
  6. In the logic:else section, put a variables:set to there. Select the hours variable name from the dropdown and leave the 0.

Set the minutes

Setting minutes is almost the same as setting hours but with just a few changes.

  1. To make things easy, right click on input:on button pressed block and select the Duplicate option in the menu. This makes a copy of the original block.
  2. In the new input:on button pressed , change the button to B.
  3. Change every variable name from hours to minutes. Change the 23 in the logic:if condition to 59. This is the limit of minutes we count.

Select 24 hour or 12 hour time

Time is shown in either 24 hour or 12 hour format. We’ll use one more button to choose which format to show. Using the 12 hour format adds an ‘AM’ or ‘PM’ at the end.

  1. In Input, get an input:on button pressed an put it on the workspace. Change the button to A+B.
  2. Grab a variables:set to , put it in the block and change the variable to ampm. Put a logic:not from Logic in where the 0 is.
  3. Pick up a ampm from Variables and connect it on the right of the logic:not . This switches our 24 hour format to 12 hour and back.

Make the timer tick

A watch really has three parts: the display, settings, and timer. We need a way to make the minutes and hours count up at the right time. Let’s code the timer.

  1. In Basic, get a basic:forever loop out to the workspace.
  2. Also in Basic, take out a basic:pause an put it into the loop. Change the time from 100 to 60000. The time is in milliseconds so we want to count each minute every 60000 milliseconds.
  3. Below the basic:pause , put a logic:if then else block. Change the condition in the logic:if to use a logic:0 < 0 .
  4. Replace the 0 on the left with the minutes variable. Change the 0 on the right to 59.
  5. Put a variables:change by into the logic:then . Change the variable to minutes.
  6. Get a variables:set to and put it in the logic:else . Again, change the variable to minutes.

Keep on coding…

  1. Now, take another logic:if then else and put it just below the variables:set to inside the first logic:else .
  2. In the second logic:if , put in a logic:0 < 0 as the condition. Replace the left 0 with the hours variable. Change the right 0 to 23. We count hours up to 23 until we go back to 0 (midnight).
  3. Put a variables:change by into the second logic:then . Change the variable to hours.
  4. Get a variables:set to and put it in the second logic:else . Again, change the variable to hours. Ok, the timer’s ready to tick.

Shake and show…the time!

We’re going back to the display code we made earlier. We’ll now make it show the real time! This step is going to be busy but we’ll get it done.

First, we have to code an adjustment for the hours number when we’re using the 12 hour format.

  1. Find the input:on shake block we coded earlier. Pull out and drag to the trash the blocks inside. We’re starting fresh.
  2. Pull out a variables:set to an put it inside the input:on shake . Change the variable to adjust. Change the 0 on the right to the hours variable.
  3. Get a logic:if then and put it under the variables:set to . Replace the condition with the ampm variable.
  4. Grab a logic:if then else and put it in the logic:then part of the first logic:if then . Change the condition to logic:0 < 0 . Replace the 0 on the left with the hours variable. Change the 0 on the right to 12. Switch the < to a >.
  5. Go get another variables:set to and put it in the logic:then of the second logic:if then else . Change the variable to adjust. In Math take a math:0 - 0 and replace the 0 in the variables:set to . Change the 0 on the left to the hours variable and the 0 on the right to 12.
  6. Take one more logic:if then and put it in the logic:else . Change its condition to logic:0 = 0 . Put the hours variable in place of the 0 on the left.
  7. Inside this last logic:if then place a variables:set to . Change the variable name to adjust and set the value to 12.

Keep on coding…

Now, we have to join up the hours and minutes to make text that will display on the watch.

  1. At the bottom of the input:on shake , insert a variables:set to . Change the variable name to time. Connect it to a text:join from Text.
  2. Make 3 copies of this last variables:set to using the Duplicate option in the menu when you right click on the block. Put the copies underneath each other so that all 4 are stacked together.
  3. In the first variables:set to , replace the second ' in the text:join with the adjust variable.
  4. With the second copy, change the first ' in the text:join to the variable time. Change the second string in the text:join to ':'.
  5. For the third copy, change the first ' in the text:join to the variable time. Change the second string in the text:join to '0'.
  6. Surround that third copy with an logic:if then block. Put a logic:0 < 0 in as the condition for the logic:if then . Pull a minutes variable in where the first 0 is. Change the second 0 to be a 9.
  7. In the fourth copy, change the first ' in the text:join to the variable time. Change the second string in the text:join to a minutes.

Keep on coding…

Ok, we’re getting close to finishing now. Here we need to add the ‘AM’ or ‘PM’ if we are in 12 hour format. Then, finally, display the complete time string.

  1. Put an logic:if then block at the end of the input:on shake . Replace the true condition with the variable ampm.
  2. Insert a logic:if then else into this logic:if then . Use a logic:0 < 0 as the condition. Change the left 0 to the hours variable. Change the right 0 to 11. Switch the < to a >.
  3. Place a variables:set to in the logic:then . Change the variable to time and attach a text:join . Make the first part of the text:join be the variable time and the second part to the text 'PM'.
  4. Do the exact same thing as in the last step but put the variables:set to block in the logic:else underneath. Make the second part of the text:join be 'AM' this time.
  5. Finally, at the very bottom of input:on shake , go get a basic:show string from Basic and put it there. Change the string 'Hello!' to the time variable.

Complete!

Wow, so awesome! You’ve got your watch coded and ready to try. Go press the Download button and put your code on the micro:bit. When you shake it, it shows the current time.

Right now, it’s showing 24 hour format: hours go from 0 to 23 and back to 0. Press the A+B buttons together to change to 12 hour format: hours go from 12 to 12 with 1 through 11 in between. It has either 'AM' or 'PM' at the end.

To set it to the current time, you use the A and B buttons. The A button moves the current hour up by one each time it’s pressed. The B button moves the minutes up by one every time it’s pressed.

Now that you can tell time on your micro:bit who knows what you will accomplish next. Only, time will tell!

Edit this page on GitHub
Edit template of this page on GitHub

Sometimes, using a default digital clock for your desktop is not enough. The default digital clock on your desktop can only show you basic time information, such as the current time and the current date. No other features are available on the default clock software. But, with digital clock software, you can display a better digital clock on your desktop, with various features and customization options.

Related:

For instance, you can apply various skins for your clock, set an alarm, and display time information from various time zones.

Alarm Digital Clock-7

Alarm Digital Clock-7 is a digital clock software available for Android, with alarm and widget features embedded on it. This software allows you to change the appearance of your digital clock, put the clock widget on your desktop, show you the current date and day of the week, set an alarm, and use background images.

Digital Clock 4

Digital Clock 4 is a customizable digital clock software that allows you to put a beautiful clock widget on your desktop. It features, skins, zoom, signals, clock color, texture, plugins, support for Retina display, multi-language support, and portable version. It is available for Windows, Mac, and Linux platforms.

Time Clock MTS

Time Clock MTS is a software that allows you to turn your Windows clock into an employee time clock, which helps you to prevent payroll errors for your employees. It allows you to manage employee attendance, prevent errors and manual calculations and prevent time card fraud. It is available in standalone and network editions.

Zune Clock

Zune Clock is a digital clock software that allows you to display digital or analog clock widget on your desktop. It features a digital clock, analog clock, chimes and the current date. This software is available as a freeware for all versions of Windows, both old and new versions.

Digital Clock

Digital Clock is a feature-rich clock software that allows you to display various time information on your desktop. It features to show/hide computer uptime, countdown, alarm, selectable alarm sounds, auto update notifier, and adjustable size. This software is available for Windows.

Voice Digital Clock and Digital Countdown Timer

This software allows you to monitor the current time and set a countdown timer for any set time. It features countdown picker, hide/show display subtitles, hide/show display panel, chime sounds, and chime indicator. It is available for all versions of Windows.

DS Clock

DS Clock is a free Windows desktop clock software that allows you to show various time information on your desktop, including current date and time, as well as time information from other time zones. Aside from that, this software can also be used as a small reminder application for you. With this software, you can customize the interface, insert text, and play chimes.

Open Time Clock

Open Time Clock is a free and secure web-based digital clock software designed specifically for any type of businesses. It displays your current time, as well as worldwide time, with camera access and control. You can access this software from any device, including desktop, laptop, and mobile devices.

Alarm

The alarm provides a free digital clock software that you can use to set a custom display text at a time of your choice. It features AM/PM/24-hour modes, alarm preview, configurable LEDs, sound playing, music playing, and fullscreen alert. This software is compatible with all versions of Windows.

Other Digital Clock Software for Different Platforms

Digital clock software is not only available for Windows platforms, but it is also available for other platforms as well. Some software is web-based, and therefore, it can be accessed from any device.

Fliqlo

Fliqlo is a digital clock screensaver software that is available for Windows, Mac, and iOS platforms. It allows you to display a clock screensaver on your device, which makes your screen look like a flip clock. It offers various features, including scalability to any size, switchable 12/24-hour clock, and support for Retina display.

Attractive Desktop Clock

Attractive Desktop Clock is an Ubuntu app that allows you to show an attractive and accurate clock on your desktop. This is a clock software that can be used in the X desktop environment, and it offers basic clock functionalities that offer only limited configuration options.

Digital clock watch cost

Alarm Clock Free

Alarm Clock Free is a simple alarm clock app for iOS. It allows you to turn your iPhone and iPod into a digital clock, with an alarm function. Not only that, it also displays weather and temperature information to keep you updated with the weather condition in your area.

3D Digital Weather Clock

3D Digital Weather Clock is a digital clock app for Android that allows you to display digital clock and weather information widget on your home screen. It features color choices, system stats, battery icon, week numbers, schedules for outdoor activities, and weather information.

Sharp World Clock – Best Digital Clock Software of 2016

Sharp World Clock is an attractive digital clock software that allows you to show various time information from different locations around the world. It offers various features, including editable clock hands and numbers, hourly/quarterly chimes, time zone converter, weather report, and automatic atomic time synchronization. This software is available for Windows operating system.

Digital Clock Mechanism

What is Digital Clock Software?

Digital clock software is the type of software that allows you to display a digital clock on your desktop, along with various related time information. This software is available on desktop, mobile, and web platforms. Usually, a digital clock software can offer various customization options, skin settings, and alarm functionality.

Time Watch Clock

Some others may offer weather information for your local area, along with the ability to count down time from any set time. Also, the software may allow you to display time information from various time zones and locations around the world, all in one place.

How to Install Digital Clock Software?

For the web version, you don’t need to install the software in order to use it. You simply visit the official website of the software and use the software directly from your browser. However, for desktop and mobile devices, you need to download the installation file from the official website of the respective software, and then run the installation file on your device.

Clock

The default clock software that comes with your operating system usually offers only some basic features, such as displaying the current time and date. No other customization options are possible for the default clock. So, if you want an enhance the functionality of your digital clock, you have to use a good digital clock software. This software allows you to display a beautiful clock widget on your desktop, as well as use it to display various time-related information.

You can use it as an alarm clock and reminder, or you can keep yourself updated with the current weather information. All in all, digital clock software offers better features and functionalities than the default clock software installed on your operating system.

Digital Clock Watch For Sale

Related Posts