Skip to content


Envie um sorriso

Iniciante | MakeCode, Python | Botões, Rádio, Tela de LED | Comunicação, Entrada/saída, Ondas de rádio, Saúde

Passo 1: Projeto

O que é?

Sharing and receiving kindness is a good way to support your well-being and that of your friends. Create a program using radio to send a smile from one micro:bit to another to support a friend.

Este projeto é parte de uma série que oferece atividades que procuram solucionar problemas e criar protótipos, concebida para explorar a tecnologia enquanto solução para o desafio dos Objetivos de Desenvolvimento Sustentável.


Coding guide

O que você aprenderá

  • How radio communication between electronic devices uses protocols to ensure messages are routed correctly
  • How technology and electronic communication can be used for good

Como funciona

  • This program uses the micro:bit's radio feature to share a smile. You can use it in the MakeCode simulator or flash the code on to 2 or more micro:bits.
  • First, it sets the radio group to 2. Groups are like channels, so any micro:bit using the same group will get the smile. You can use any group number you like from 0-255.
  • When you press button A, it sends a radio text message 'smile'. It also clears the screen so you can send another smile.
  • When it receives a radio message, it shows a smile emoji on the LED display.
  • The combination of radio group and the text of the radio message sent make up a protocol: a set of rules for how two devices communicate.

O que você precisa

  • 2 micro:bits (ou simulador MakeCode)
  • Editor MakeCode ou Python
  • bateria (opcional)

Passo 2: É hora de programar

Passo 3: Vamos melhorar

  • Customise the smile emoji to your own happy face.
  • If you're working in pairs in a class, select your own unique radio group numbers for each pair of students so you can send messages to your partner but not anyone else.
  • You could also do this by keeping the same radio group, but modifying the code so the text message sent is unique to your pair. Modify the code so it only shows a smile if the correct message is received.
  • How might you send a different emoji if you press button B?