+21622886281
App Inventor Micro:bit

Connect the micro:bit card to the smartphone via bluetooth

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.

To connect a Micro:bit to a smartphone via Bluetooth, you will need to follow these general steps:

  1. Make sure that the Micro:bit is powered on and has the necessary firmware installed to act as a Bluetooth peripheral.
  2. On your smartphone, go to the Bluetooth settings and make sure that Bluetooth is turned on.
  3. On the Micro:bit, press the “reset” button to start the Bluetooth advertising process.
  4. On the smartphone, look for available Bluetooth devices and look for the Micro:bit. The Micro:bit will be advertising itself with its default name “micro:bit [last 6 digits of its serial number]”
  5. Once the Micro:bit is found, tap on it to initiate the pairing process.
  6. On the Micro:bit, press button A to confirm the pairing.
  7. The smartphone and Micro:bit will now be connected via Bluetooth.

It’s important to note that the pairing process may vary depending on the operating system of the smartphone, and also the way the Micro:bit is programmed.

Also, keep in mind that the Micro:bit‘s Bluetooth functionality is limited and can only be connected to one device at a time, so it is important to disconnect from the previous device before connecting to a new one.

Also, note that the Micro:bit doesn’t have a screen, so to confirm the pairing, you might need to see on the smartphone if the micro:bit is connected.

Purpose of this tutorial:

In this tutorial we will see how to connect the Micro:bit card to the smartphone via bluetooth.

we will create two programs: a mobile application with App Inventor for the smartphone and a makecode program for the Micro:bit card.

Necessary components

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.

Makecode program

Here is the makecode program which allows you to connect the Micro:bit card to the smartphone.

The letter ‘c’ is displayed if the Micro:bit card is connected to the smartphone and the letter ‘d’ otherwise.

Creation of the application with AppInventor:

We will create a mobile application called ‘connect_microbit’ with App Inventor which allows you to connect the smartphone to the Micro:bit card.

We propose to create the design of the application, with the following visual:

Programming with App Inventor

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:

  1. Click on the ‘scan‘ button
  2. After finding the Micro:bit card, Click on the ‘Stop Scan’ button
  3. Tap the name of the Micro:bit card
  4. Finally click on the ‘connect’ button

Download project Download application




0 commentaire


Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top