Micro:bit is a small, programmable computer that is designed to be easy to use for beginners. It has a variety of inputs and outputs, including a built-in Bluetooth module, which allows it to communicate wirelessly with other devices such as smartphones and tablets.
It is possible to control the flashlight on a smartphone using a Micro:bit via Bluetooth. Here’s a general outline of the steps you would need to take:
In this tutorial we will see how to turn on the smartphone torch using the Micro:bit card.
This is why we are going to create two programs: a mobile application with App Inventor for the smartphone and a makecode program for the Micro:bit card.
Micro:bit is a small, programmable computer that is designed to be easy to use for beginners. It is developed by the Micro:bit Educational Foundation, a not-for-profit organization based in the UK. The Micro:bit was originally intended to be used as a tool for teaching computer science and programming in schools, but it has since been adopted by a wide range of users for a variety of different projects.
The Micro:bit is a small device, about the size of a credit card, that has a variety of inputs and outputs, including a 5×5 LED matrix, two programmable buttons, and a built-in accelerometer, compass, and thermometer. It also has a built-in Bluetooth module, which allows it to communicate wirelessly with other devices such as smartphones and tablets.
Here is the makecode program which allows you to connect the Micro:bit card to the smartphone and send a message containing the order to turn on the smartphone torch.
We are going to create a mobile application named ‘allumer_torche’ with App Inventor which allows you to receive a message from the Micro:bit card.
We propose to create the design of the application, with the following visual:
To program the application, App Inventor offers us to use the Blocks space, which allows you to create a program in the form of a block diagram. Very easy to use but requiring a little programming logic.
Here is the program of the application created in the Blocks area of the Inventor App:
After installing the mobile application on your Smartphone, follow these steps to connect to the Micro:bit card: