Skip to content

Atividade

Calming LEDs

Iniciante | MakeCode, Python | Tela de LED | Animação, Iteração, Sequência

Passo 1: Projeto

O que é?

Turn your micro:bit into a simple digital device to help you relax by slowing and regulating your breathing using a simple animation sequence.

Introduction

Coding guide

Como funciona

  • Build an animation sequence in a 'forever' loop to keep it running.
  • Use the large and small built-in diamond icons to create a pulsating effect.
  • Add pause blocks to slow down the animation to a relaxing pace.
  • Use a longer pause in the middle of the animation, perhaps 2 seconds which is 2000 milliseconds.
  • Test out your code in the MakeCode simulator to make sure it works the way you want before transferring it to your micro:bit.

O que você precisa

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

Passo 2: É hora de programar

Passo 3: Vamos melhorar

  • Change the pause times to match your own preferred pace of breathing.
  • Create your own images to replace the diamond icons.
  • Add more steps to make your animation smoother.