Skip to content

Activité

Touch emotion badge

Débutant | MakeCode, Python | Boutons, Touch logo, Écran LED | Entrée / Sortie

Étape 1 : Maîtrisez

Qu'est-ce que c'est ?

Add another expression to an emotion badge project using the new micro:bit's touch logo sensor as an extra button

Introduction

Guide de codage

Ce que vous apprendrez

  • How computers take inputs, process them using code and create different outputs
  • How to use the new micro:bit's touch logo like a button input to trigger outputs

Comment ça marche

  • This program senses if you press button A and shows a happy face icon on the LED display output.
  • It senses if you press button B and shows a sad face on the LED display.
  • If you touch the gold logo on the front of the new micro:bit, the program detects your finger and shows a surprised face on the LEDs.

Ce dont vous aurez besoin

  • new micro:bit with sound (or MakeCode simulator)
  • MakeCode ou éditeur Python
  • un boîtier de piles (optionnel)

Étape 2 : Codez

Étape 3 : Améliorez

  • Change the icons that appear, or draw your own to show different emotions.
  • Create an animated sequence of faces when you press each button.
  • Add different sounds that match each emotion.