You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Hi. Yes, what you're doing is right - However because the 'console' (the interactive command-line) is on USB, the callback is disabled.

    Try moving the console out of the way with Serial1.setConsole(), and it should work. You'll then have to reset the board before you can program it again though (unless you program it via Serial1).

    However you're doing the print, which will then appear on Serial1 (pins A9/A10). If you wanted to echo the data back down USB then you could do: USB.write("<USB> "+data+"\r\n").

    Hope that helps!

About

Avatar for Gordon @Gordon started