It is fun with fortune tellers right! But they cost a lot and can be difucult to use. Today I will show you how to create your very own designed fortune teller! You can ask it any yes, no or maybe question and it will give you the answer. This can be fun for kids of any age or as a family activity.
Step 1: What You Will Need
- A Microbit chip
- A computer
- The website makecode.org
Step 2: Go to Website
Search up the following website:
When you get to the website you will see "microbit", click "start coding" under the collum.
You will see an icon where it says "New Projects" when you see it click the icon.
Plug in the micro bit to your computer. When you are in the page you will see this. Click the category that says "input" and select "On button A pressed". So your Microbit will know that the next steps will happen when the button A is pressed.
Press the category "Basic" and select "Show string".
Change the mesasage to "ASK ME A QUESTION". Remember all capital letters!
Click the category "Music" and select two of "Play tone Middle C 1 beat" but change the second one to "Play tone Middle E 1 beat"
Click the category that says "Input" and seclect "On shake", so the next next steps will happen when you shake the Microbit.
Click the category "Basic" under the icon it will apear another categoy that says "More", Click that categoy and select "Clear screen". so the message from previous steps disapears from the screen.
Click the category "Variables" and select "Set... To 0" and change the text to "Set random number"
Click the category "Math" and select "Pick random number 0 to 10" and change it to "0 to 3", do this so the Microbit will pick the numbers randomly.
Click the category "Logic" and select "If true then, else if then" and select "if true then". This is to make the answers different every time so that it only says one thing and not all answers the fortune teller can give at once.
Click the category "Logic" and select three "0=0". Click the category "Variables" and select three "Set random number" and put them in each circle on the left that the 0 is in. After that put in any different number you like into the other circle depending on which answer you want each number to reprecent.
Click the category "BASIC" and select three "Showstring" and change the three different texts to "INDEED", "MAYBE" and "NO". Remember all caps! This will be the words that come up on the screen when you have shaken the Microbit.
Now you are done with programing, now you only need to download it and put it on your Microbit.
Click the download button in the left corner.
It will apear a small icon in the bottom right corner showing you that the download is complete. Click the text that says "Show in folder". You will see a file that says "microbit-Untitled(.).hex", drag the file to the category that says "Microbit". When you are done with that step you will wait for approximately 3-7 minutes and you will be done with your coding and now you can use your fortuneteller!