0%
Loading

My Blog

Tutorial - Microbit basic

The Micro:bit has a built-in temperature sensor that measures temperature in Celsius. When button A is pressed, the temperature is converted to Kelvin by adding 273 and displayed on the screen. If button B is pressed, the temperature is converted to Reaumur by multiplying the Celsius value by 0.8. When buttons A+B are pressed together, the temperature is converted to Fahrenheit using the formula Celsius × 1.8 + 32. After the Micro:bit is powered on, a small heart icon appears as a sign that the device is ready to use. The temperature in Celsius is continuously displayed on the screen using the forever function. This program utilizes the onButtonPressed function to detect button presses and display the converted temperature. With this feature, users can understand temperature changes in different units