mirror of
https://forge.apps.education.fr/blender-edutech/blender-edutech-ressources-pedagogiques.git
synced 2024-01-27 08:26:31 +01:00
14 lines
364 B
Python
14 lines
364 B
Python
from microbit import uart, sleep
|
|
from microbit import *
|
|
|
|
uart.init(baudrate=9600) # Initialisation du port série
|
|
|
|
while True:
|
|
while not uart.any(): # Attente d'un message
|
|
pass
|
|
|
|
display.scroll('ok : ') # Bonne recéption du message
|
|
content = uart.readline()
|
|
display.scroll(content[:-1]) # Affichage du message sans le '/n'
|
|
sleep(400)
|