Turn on four LEDs using radio communication between two Micro:bit boards

Micro:bit 30-06-23
380 0

Tutorial plan

1- Introduction to the Micro:bit Board Radio Module

2- Controlling four LEDs by radio communication from the Micro:bit board

3- The components needed to control four LEDs by Micro:bit

4- Mounting the Micro:bit board with an four LEDs

Introduction to the Micro:bit Board Radio Module

The BBC micro:bit is a pocket-sized computer board designed for educational purposes. It has a built-in radio module that allows micro:bit boards to communicate with each other wirelessly. The radio module on the micro:bit uses Bluetooth Low Energy (BLE) technology, which enables short-range communication between devices.

The radio module on the micro:bit board allows for wireless communication and data transfer. It operates on the 2.4 GHz frequency band and supports a range of up to 30 meters (or about 100 feet) in an open space environment. The micro:bit radio module can be used for various applications, such as creating interactive games, sending messages between devices, or building remote-controlled projects.

To use the radio module on the micro:bit, you can program it using the micro:bit's programming environments, such as the Microsoft MakeCode editor or the MicroPython programming language. These environments provide blocks or functions specifically designed to control the radio module and enable communication between micro:bit boards.

By utilizing the radio module, you can establish a communication link between multiple micro:bit boards, allowing them to exchange data, coordinate actions, or create collaborative projects. It's a powerful feature that adds interactivity and connectivity to your micro:bit projects.

Controlling an four LEDs by radio communication from the Micro:bit board

To control four LEDs using radio communication from one micro:bit board to another, you'll need four micro:bit boards—one acting as a transmitter and the other as a receiver. Here's a step-by-step guide on how to accomplish this:

Transmitter (Micro:bit A):

1- Connect four LEDs to micro:bit's GPIO pins (for example, P0 for red LED , P1 for green LED, P2 for yellow LED and P12 for blue LED). Ensure to use a current-limiting resistor (e.g., 220-470 ohms) in series with the LED.

2- Open the Microsoft MakeCode editor.

3- Write the following code to send radio messages:

makecode-radio-sending

Download program

 

4- Download the code to the micro:bit (A) and disconnect it from the computer.

Receiver (Micro:bit B):

1- Connect another micro:bit board to your computer and open the programming environment.

2- Write the following code to receive radio messages and control the four LEDs:

Download program

 

3- Download the code to the micro:bit (B) and disconnect it from the computer.

Now, whenever you press button A on the transmitter micro:bit (A), it will turn on the four LEDs connected to P0 micro:bit (B).

whenever you press button B on the transmitter micro:bit (A), it will turn off the four LEDs connected to P0 micro:bit (B).

 

The components needed to control three LED by Micro:bit

To control an LED using a Micro:bit, you will need the following components:

Two Micro:bit board

The Micro:bit board is a small, programmable development board designed for educational purposes and beginner-friendly programming. It was created as a collaboration between several organizations, including the BBC, in order to promote computer science education and coding skills among young learners.

With the Micro:bit board, users can create a wide range of projects and interactive applications. They can write programs to control the LEDs, read sensor data, respond to button presses, and communicate with other devices using Bluetooth. The versatility of the board allows for creative exploration and learning in areas such as robotics, Internet of Things (IoT), and wearable technology.

The Micro:bit has gained popularity in schools, coding clubs, and maker communities around the world as an affordable and engaging tool for teaching coding concepts and electronics. Its compact size and user-friendly interface make it an excellent choice for beginners, while its capabilities and extensibility provide room for more advanced projects as well. Micro:bit board

The GPIO expansion card for the Micro:bit card

The GPIO expansion board for the Micro:bit board expands the capabilities of the Micro:bit board by adding more input/output (GPIO) pins and additional functionality. The GPIO expansion card for the Micro:bit card

LEDs:

You will need three LEDs of your choice. These can be regular LEDs or RGB LEDs, depending on your project requirements.four LEDs

Resistors:

LEDs require current-limiting resistors to prevent them from burning out. The value of the resistor depends on the forward voltage and current rating of the LEDs. A typical value for a standard LED is around 220-470 ohms.four resistors

Jumper wires

You will need jumper wires to connect the Micro:bit to the LED and the current-limiting resistor. Make sure you choose the appropriate type of jumper wires (e.g., male-to-male, male-to-female, or female-to-female) based on your specific setup. Jumper wires

Test plate

The breadboard is a common tool used in robotics and electronics to create circuit prototypes and temporary connections. It makes it easy to test and connect electronic components together without having to solder the connections.

Once you have gathered these components, you can properly connect them and program the Micro:bit board to control the LED as needed. Be sure to follow good connection and safety practices when handling electronic components. Test plate

Mounting the Micro:bit board with four LEDs

To mount the Micro:bit board with four LEDs, you will need a breadboard and some additional components. Here's a step-by-step guide:

1- Connect the Micro:bit to the breadboard.

2- Connect the LEDs to the breadboard:

- Insert the four LEDs into the breadboard, making sure that the shorter leg (cathode) of each LED is connected to GND pin of Micro:bit.

- Connect a 220-ohm resistor to the longer leg (anode) of each LED.

- Connect the other end of each resistor to (P0, P1, P2 and P12).

Now, when you write code to control the LEDs using the specified pins, the Micro:bit will send signals to the LEDs through the breadboard, and they will light up accordingly.

Mounting the Micro:bit board with foor LEDs

Mounting the Micro:bit board with four LEDs

0 comment

Leave a comment

Veuillez noter s'il vous plaît*

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

Purpose of this website

Educational robotics refers to the use of robots and robotics technology to promote learning in educational settings. It involves the integration of technology, engineering, and computer science into the classroom, allowing students to engage in hands-on, project-based learning experiences.
In this context, our website represents an excellent resource for parents, teachers and children who wish to discover robotics.

Contact details

Zaouiet Kontech-Jemmel-Monastir-Tunisia

+216 92 886 231

medaliprof@gmail.com

Pictures of the articles

Robotic site created by MedAli-Teacher info