Open ckaraviotis opened 7 years ago
What do you mean specifically by "SAMD21 M0 board". We have tested the code on Arduino Zero, Arduino M0 Pro, Adafruit Feather M0 Basic, Adafruit Feather M0 BLE, Adafruit Feather M0 Express, Adafruit Circuit Playground Express all based on the SAMD21 processor and none of them needed the modification that you suggested. By the way these were all using the latest Arduino.cc IDE. What were you using to compile?
This was using the Arduino M0 (not pro), with the latest version of the Arduino IDE, 1.8.2.
IRLibDecodeBase uses Serial.print statements throughout to log information to the console.
In the SAMD21 M0 board, the method for printing to the USB console is exposed via SerialUSB.print.
As a result of this, when I tested any of the decode examples (using decoder.dumpResults) the arduino became unresponsive.
I found a quick fix by adding
#define Serial SERIAL_PORT_USBVIRTUAL
to the IRLibDecodeBase.cpp file, which makes all the print statements work OK.This might need to be added to other files wrapped in an
#if