PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

26 líneas
450B

  1. #include <MIDI.h>
  2. // Before running the program below, make sure you set
  3. // UseReceiverActiveSensing (optionally UseSenderActiveSensing) in Settings.h to true
  4. MIDI_CREATE_DEFAULT_INSTANCE();
  5. void handleError(int8_t err)
  6. {
  7. digitalWrite(LED_BUILTIN, (err == 0)? LOW : HIGH);
  8. }
  9. void setup()
  10. {
  11. pinMode(LED_BUILTIN, OUTPUT);
  12. digitalWrite(LED_BUILTIN, LOW);
  13. MIDI.setHandleError(handleError);
  14. MIDI.begin(1);
  15. }
  16. void loop()
  17. {
  18. MIDI.read();
  19. }