Micro:bit Smart Watch

by TomasraketakX in Circuits > Wearables

2301 Views, 4 Favorites, 0 Comments

Micro:bit Smart Watch

IMG_20200302_214155.jpg

I got a set of micro: bit smart home for Christmas. So I thought I could create a smart watch that would work as an alarm clock, watch, music player but even as a pedometer and calculator. In the end I did great and so I can write you instructions how to make and program this smart watch: D.

Supplies

Micoro: bit smart home

cardboard

imitation leather

some cables

paperclip

adhesive tape

Step 1: Building Box

IMG_20200112_200808.jpg
IMG_20200112_200925.jpg

First we make a box. Let's start by drawing two 7 cm * 6.2 cm rectangles on the cardboard, then the other two rectangles on 3.5 x 7 cm, and previously one 3.5 x 6.5 cm on the cardboard. You can then cut out these rectangles. And as the last part of this goal, use a glue gun to stick the rectangles to the boxes as shown. We left one 7 x 6.2 cm rectangle and we could work with them in the next steps.

Step 2: Finishing the Box

IMG_20200113_192024.jpg
IMG_20200113_192034.jpg
IMG_20200113_160328.jpg
IMG_20200113_160602.jpg

So we already have the base of the box, but that doesn't mean it's done. And we will look at how to complete it in this step. The most anticipated piece of work on the box where the headphone jack is when the microbit USB port is in the exposed part of the box. Then we glue the last rectangle, which we have left in the last step, as we can in the picture. Who wants to be a master who looks like a small bird that looks like a box, but still do not make the upper leatherette rectangle that already offers, appears. And now comes the hard part. They chase the cover and mark the available A and B on the body. Then, at these two points, you have a hole on the carton. Push them through the prepared holes so that they touch your fingers. As the penultimate part of this step, where the display connectors are, cut a small hole so that the connectors better touch the cables.And last to the box glue gun leatherette for better aesthetic appearance.

Completing the Watch

IMG_20200229_195301.jpg
IMG_20200115_192849.jpg
IMG_20200301_115940.jpg
IMG_20200115_194737.jpg
IMG_20200229_195738 (1).jpg
IMG_20200301_105055 (1).jpg

In this step we will complete our microbit watch. So let's do it. First we cut out a piece of leatherette as wide as our tomb and as long as the circumference of our hand. then glue this piece to the bottom of our box with a glue gun.Then, at the other end of this piece of leatherette, we create a few holes with a paper clip. Next, pierce a hole in a piece of cardboard that is above the microbit ports with a paper clip and glue the paper clip there.Now it's your turn to cover the battery. We draw a battery on the cardboard and cut these pieces together and stick them together using an adhesive gun. Subsequently, for better appearance, we cut out the same large pieces of leatherette as we just cut from cardboard. Stick those pieces to the battery cover. Finally, glue the battery cover to the box as shown in the picture. And now we have finished hardware so we can look at softwarwe.

Start of Programming

Microbit start programing

Click on the new project icon and nothing prevents us from starting the programming. Now you have your watch done, but we will never program ourselves: D. And that's why I will teach you how to program microbits. Best available go to page makekode .t.Click on the Basic icon and drag on the white area "on start" and "show leds". Then we go to Imput and here we see various conditions which when they are fulfilled will start the program we put into them. We choose on the button A pressed and drag it to the desktop. Then drag the "show leds" into this block and click what the 5 * 5 led display will show on the microbit. This can be repeated two more times but we have to set the program to start when you press A and A or B. Finally, we can add a welcome image to be displayed when the program loads and images to be displayed when A, B, and A + B are pressed.

Watch Programming

IMG_20200302_201333.jpg

In the last step we learned the basic theory of microbit programming. If you do not understand something and want help so write in the comments, if I know I will advise you. First, let's make it clear what we want the microbit to do. I made this program work like this: When I press button A, the time is added to the time or the hour adds the time at which the alarm sounds. the time you want the alarm to sound depends on the setting. And just the settings will change when you press A + B. Now let's explain what each setting means: Setting 1 means setting the time when pressing A adds an hour to the time, and pressing B a minute. Setting 2 means that the alarm time is the same as the time. The A button adds one hour to the alarm time and the B button adds one minute to the alarm time.Setting 3 means that both the alarm time and the alarm time are already set so that button A and button B do nothing only when you press or the buttons at the same time switch to the next setting. Finally, setting 4 means that the alarm clock is not active and the watch only shows the time.The next step tells you how to program the microbit so that it can count as a calculator.

Calculator Programming

Microbit calculator
IMG_20200302_144651.jpg
IMG_20200302_144703.jpg

In the last step, I promised you that we would look at how to program a microbit to work as a calculator, and here you have it: This program is programmed to create 4 variables: frist number, second number, function and result. Subsequently, pressing the A button adds one to the "frist number" variable and pressing B adds one to the second number variable. And now you're sure to ask what happens when we push A + B? You guessed correctly if you thought it was changing the function. When the value of the variable function equals 0, it means + when 1 means - if 2 then * and finally when 3 then the / function is turned on.

Music Programming

Microbit music player

We've already tried to program a microbita to behave like a watch and a calculator. In this step we will look at something more enjoyable, namely music programming. You can find music programming blocks in the music folder. There you can choose if you want to play some of the pre-programmed melodies or you can program your own. To program your own melodies, drag the first block in the menu to the desktop. When you click on this block where the middle C is written, you will see a piano keyboard where you can choose which note to play this block.Then click on "beat" to determine the length of the note. And now you can program according to music some song or maybe like me czech version Jingle bells: D. But it takes a lot of patience because you have to set each note separately. Below is a program in which there are 4 tunes. one starts at the start and the other three when A, B and A + B are pressed. Have a nice listening :)

Smart Watch Program

Microbit smart watch

If the other steps were easy, this program would be very complicated. First of all, we copy all blocks to watch. Then we need more settings (switch variable) about 11. Setting 1-4 is already known from the step where we programmed the watch or: Setting 1 = setting the time, Setting 2 = setting the alarm time, Setting 3 = Alarm is active, Setting 4 = alarm is off. Now to this setting we add: Settings 5 = Music Play, Settings 6 = Addition Calculator, Settings 7 = Subtraction Calculator, Settings 8 = Multiplication Calculator, Settings 9 = Divide Calculator, Settings 10 = Set frist number and second number variables to zero, and last 11 Setting 11 = pedometer. The whole program works so that in block on button A / B pressed there are several blocks when switch = 5 so it raises some variable by one. And this is where the pads need 5. However, the whole program is so difficult to describe it in full words would be published on the book and so I enclose screenshots of this program. And here is a link to the video where all the features of this program are shown:

Evaluation of the Whole Project

IMG_20200229_201957.jpg
IMG_20200301_115838.jpg
IMG_20200301_115900.jpg
IMG_20200302_162823.jpg

This project was much harder than I originally thought. I think there is still something to improve but I leave it to you. You could even program a compass or some game. In fact, there are no limits to imagination. I hope you liked this project or write any questions about this project to the comets if I know I would like to answer. I will be very happy if you vote for me in the wearable competition. I wish you good luck in implementing this project :).