
"""


Auteur: anonyme

Interface: microbit

Nom du projet: Utiliser les boutons

Description: <span class="tooltip-title">Utiliser les boutons</span><span class="tooltip-description">No-description</span>

Toolbox: vittascience

Mode: mixed

Blocks: <xml xmlns="https://developers.google.com/blockly/xml"><block type="on_start" id="G[=T#8yqB70`NFgYq}GP" deletable="false" x="-437" y="37"></block><block type="forever" id="9|A`~)WEpTgm@PI4cWL*" x="-38" y="63"><statement name="DO"><block type="io_onMovement" id="/Nw?H7#)h`fVUJ|x2sQ,"><field name="MOV">shake</field><statement name="DO"><block type="show_icon" id="rT87{K(s}4b.5c!a+yT#"><field name="ICON">HEART</field><next><block type="io_pause" id="9SD@y~)K]7-z]|lqIyc;"><field name="UNIT">SECOND</field><value name="TIME"><shadow type="math_number" id="-(Ei0|V%!`.n)x+(krLg"><field name="NUM">1</field></shadow></value><next><block type="clear" id="c{u}1-O;Ztpia)bIyxS{"></block></next></block></next></block></statement></block></statement></block></xml>

Projet généré par Vittascience.

Ce fichier contient le code textuel ainsi que le code blocs. Il peut être importé de nouveau

sur l'interface http://vittascience.com/microbit


"""

from microbit import *
import utime

while True:
  if accelerometer.current_gesture() == 'shake' :
    display.show(Image.HEART)
    utime.sleep(1)
    display.clear()
