Skip to content

Activité

Sensory toy

Débutant | MakeCode, Python | Accéléromètre, Haut-parleur, Écran LED | Capteurs, Conception du produit, Entrée / Sortie

Étape 1 : Maîtrisez

Qu'est-ce que c'est ?

Make a sensory toy that responds to movement with light and sound.

Introduction

Guide de codage

Ce que vous apprendrez

  • How to use the micro:bit's built-in accelerometer sensor inputs and new expressive sounds as outputs to create a toy that could help learners who respond well to stimulation through touch, light and sound. Different sounds are played and pictures displayed depending on how you move it.

Comment ça marche

  • The micro:bit's built-in accelerometer sensor measures forces.
  • The micro:bit uses readings from the accelerometer to trigger events when you move it in different ways.
  • If you shake the micro:bit, it plays a giggle sound on the built-in speaker output and shows a smile on the LED display.
  • Different icon and sound outputs are triggered by different movements such as tilting the micro:bit left and right or placing it with the logo pointing up or down.

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

  • Add different pictures and sounds when you press button A, B or touch the logo.
  • Experiment with different new expressive sounds like 'giggle', 'happy' and 'twinkle'.
  • Add an animation or your own pictures to go with each movement.
  • Create a case or holder for the micro:bit and battery pack that allows the sound to come out and the LED display to shine though, perhaps diffusing the LED light slightly.
  • If you're a teacher, you may also be interested in our Sensory classroom lessons.