+21622886281
Micro:bit Project

Switch a lamp on and off via bluetooth with the computer and Micro:bit

Objective of this project

In this project, we are going to create a system allowing to turn on and off a lamp (by bluetooth) using the Micro: bit card and a computer.

This is why we are going to create two programs: one for the computer and the other for the Micro:bit card.

Components required:

  • micro:bit card
  • computer
  • lamp
  • relay
  • test plate
  • test leads

Assembly

Communication between computer, HC-06 and Micro:bit

Makecode program

Here is the makecode program which allows you to connect the Micro: bit card to the HC-06 bluetooth module and to receive a message containing the order to turn the lamp on or off.

Python program executed in the computer:

Here is the program which allows the computer to connect and send data to the HC-06 bluetooth module.




0 commentaire


Leave a comment

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

Scroll to Top