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 send a message from a Micro:bit to a smartphone via Bluetooth. Here’s a general outline of the steps you would need to take:
On the smartphone side, you can use the Bluetooth libraries provided by the platform to receive the message and display it to the user. You should also consider the different platforms and their API’s on how to receive data via Bluetooth, and also the way to display the message to the user.
In this tutorial we will see how to send a message from the Micro:bit card to the smarthpone via Bluetooth.
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
The micro:bit is a small, low-cost computer designed for educational use, particularly in the fields of computer science and engineering. It is about the size of a credit card and can be programmed using a variety of languages, including Python, JavaScript, and Microsoft Block Editor. The device features a small LED matrix display, two buttons, a built-in accelerometer, and a radio module for wireless communication. The micro:bit is intended to be used as a tool for teaching children how to code and how to create their own digital devices and projects.
Here is the makecode program which allows you to connect the Micro:bit card to the smartphone and send a message by bluetooth.
The letter ‘c’ is displayed in the Micro:bit card if the Micro:bit card is connected to the smartphone and the letter ‘d’ otherwise.
If we press button A, we send a message to the smartphone.
We will create a mobile application named ‘receive_microbit’ with App Inventor which allows you to receive a message from the Micro:bit card.
We therefore suggest that you 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:
Remark:
After installing the mobile application on your Smartphone, follow these steps to connect to the Micro:bit card:
dienmay.thodienlanh24h.com 05-04-2323
There is certainly a great deal to find out about this issue. I love all the points you have made.