Skip to content

Instantly share code, notes, and snippets.

@ypelletier
Last active July 9, 2025 16:06
Show Gist options
  • Select an option

  • Save ypelletier/047644f4fac43c3274a5c6305c14b178 to your computer and use it in GitHub Desktop.

Select an option

Save ypelletier/047644f4fac43c3274a5c6305c14b178 to your computer and use it in GitHub Desktop.
Réception d'un signal MIDI par un Raspberry Pi Pico.
'''
Réception d'un signal MIDI par un Raspberry Pi Pico.
Ce script minimaliste affiche en hexadécimal chaque donnée reçue via MIDI.
Pour plus d'infos:
https://electroniqueamateur.blogspot.com/2025/07/midi-in-avec-le-raspberry-pi-pico.html
'''
import machine
uart = machine.UART(1,31250)
while True:
if (uart.any()):
message = uart.read(1)[0]
if (message < 0xf8): # pour éviter les messages "system real time"
print(hex(message))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment