First, you'll need to setup your Microbit. Go to the Microbit coding platform and start a new project. Click on 'New Project' in the 'Projects' dropdown menu. Give your project a name, for instance, 'Temperature Tales'.
Next, write code to read the temperature from your Microbit's temperature sensor. Drag and drop the 'show number' block from the 'Basic' category into the coding area. Then, from the 'Input' category, drag and drop the 'temperature' block inside the 'show number' block. Your code should look like this:
basic.showNumber(input.temperature())
Upload your code to the Microbit and test it to ensure that it correctly displays the current temperature.
Now, it's time to create your story. Decide on a narrative that changes based on the temperature. For example, you might tell a story about a snowman that melts as the temperature increases. Write down your story, making sure to include different versions for low, medium, and high temperatures. Keep your sentences short as the display of Microbit is limited.
Next, code your story into your Microbit. Use 'if' blocks from the 'Logic' category to check the current temperature and display different parts of your story depending on the temperature. For example:
if (input.temperature() < 10) { basic.showString("Snowman is cold!") } else if (input.temperature() < 20) { basic.showString("Snowman is melting!") } else { basic.showString("Snowman is gone!") }
Upload your code and test your story to make sure it changes correctly with the temperature.