Qu'est-ce que c'est ?
Make a duck fly from one micro:bit to another and hear a ‘hello’ sound when it lands. This project will help you learn about the micro:bit's radio function.

Comment ça marche
- The program should be downloaded onto two micro:bits to work.
- The program uses radio to send a message from one micro:bit to another.
- Both micro:bits should be set to the same radio group number (which can be any number from 0 to 255) in order to be able to communicate. In the code below, the radio group is set to 23. Dans une classe nombreuse, les enseignants devraient attribuer à chaque binôme d'élèves un numéro unique afin que leur code n'interfère pas avec celui des autres élèves.
- Secouez votre micro:bit pour envoyer le canard de votre micro:bit à celui de votre ami. When your micro:bit’s accelerometer detects the movement, the program sends a radio signal and clears your micro:bit’s LED display.
- When your friend’s micro:bit receives a radio signal, it shows a duck on their LED display and plays a ‘hello’ sound.
- Your friend can shake their micro:bit to send the duck back to you.
Ce dont vous aurez besoin
- un micro:bit V2
- L'éditeur MakeCode
- coupleur de piles
Codez votre projet
Voici les blocs dont vous avez besoin pour faire le projet - il faut maintenant les mettre ensemble.
Instructions étape par étape
- Ouvrez le projet pour trouver les blocs dont vous avez besoin en utilisant les boutons ci-dessus.
- Find the radio set group 23 block and put it into the on start block. Change the number 23 to a different number if you need to.
- Find the clear screen block and put it inside the on shake block.
- Then find the radio send string ‘DUCK’ block and put it inside the on shake block under the clear screen block.
- Find the show icon (duck) block and put it into the on radio received receivedString block.
- Find the play hello until done block and add it under the show icon (duck) block inside the on radio received receivedString block.
- Téléchargez le programme sur votre micro:bit, branchez un pack de piles et essayez-le!
Personnalisez-le
- Change the duck in the show icon block to a different icon using the drop-down arrow. Que peux-tu jeter d'autre à un ami? Assurez-vous d'effectuer les modifications dans les programmes des deux micro:bits de votre groupe.
- Change the sound hello in the play hello until done block to a different sound using the drop-down arrow. Quels autres bruits peux-tu faire?
Exemple de projet réalisé
Jetez un coup d'œil à un extrait de code finalisé.
Projets associés
This project is part of a collection of inclusive projects with sounds and images.


