+21622886281
App Inventor Micro:bit Project

Control a boat equipped with Micro:bit by Smartphone via Bluetooth

Toy boat is a small boat that is powered by a Micro:bit board, which is a small computer that can be programmed to control the boat’s motors. The Micro:bit board can be programmed to control the speed and direction of the boat’s motors, allowing for the boat to be controlled remotely or autonomously. The Micro:bit can also be used to add additional features such as sensors, lights, and communication capabilities. The boat can be powered by either batteries or a small electric motor. The Micro:bit board can be programmed using MicroPython or using an online code editor such as Microsoft MakeCode.

A toy boat can be controlled using Bluetooth by using a Bluetooth module of Micro:bit board.

Objective of project:

In this project, we are going to control a small boat equipped with the Micro:bit card by a smartphone 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.

Components required

Micro:bit

Micro:bit is a small, low-cost computer that is designed to be used for educational and hobbyist projects. It was developed by the BBC in partnership with a number of technology companies and organizations. The Micro:bit is about the size of a credit card and has a number of built-in features, including a processor, memory, and a variety of sensors and input/output (I/O) options.

The Micro:bit has a 5×5 LED matrix that can display text and simple graphics, two push buttons, a 3-axis accelerometer, a compass, and a temperature sensor. It also has a micro-USB port for power and data transfer, and a 25-pin edge connector that can be used to connect external sensors and actuators.

motor driver board

A Micro:bit motor driver board is a type of add-on board that is designed to interface with a Micro:bit board to control motors. The motor driver board allows the Micro:bit to control the speed and direction of motors, and is typically equipped with motor driver chips, such as L293D or L298N, to control the motors.

The motor driver board usually has connectors to connect the motors, as well as power connectors to supply power to the motors. The board also has connectors to connect the Micro:bit board, which can be used to send control signals to the motor driver chips, in order to control the motors.

pump of water of 5V

To pump water to a toy boat using a 5V power source, you would need a pump that is designed to run on that voltage and a way to connect the pump to the power source and the boat. You may also need additional components such as tubing or valves to direct the flow of water to the boat. It is important to make sure that the pump is rated for the type of water it will be used with (e.g. freshwater or saltwater) and that it is rated for the volume of water that needs to be pumped.

9V battery 

A 9V battery is a type of primary battery that provides a nominal voltage of 9 volts. It is commonly used in small electronic devices such as radios, smoke detectors, and portable guitar amplifiers.

toy boat

Mounting

  1. Connect the Micro: bit card to the motor driver card

  2. Connect the servomotor responsible for the orientation of the boat to pins S1 of the motor driver board

  3. Connect the water pump to terminal M3 of the motor driver board.

Makecode program

Here is the makecode program which allows you to connect the Micro: bit card to the smartphone and to receive a message containing the command order of the boat.

Version 1 program

Version 2 program

Creation of the application with App Inventor:

We are going to create a mobile application called ‘order_bateau’ with App Inventor which allows you to control the boat equipped with the Micro: bit card by the smartphone.

We therefore suggest that you create the design of the application, with the following visual:

Version 1 designer application

Version 2 designer application

Programming with App Inventor

To program the application, App Inventor suggests that we 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:

version 1 program App Inventor

version 2 program App Inventor




0 commentaire


Leave a comment

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

Scroll to Top