The REPL
The other feature of the serial connection is the Read-Evaluate-Print-Loop, or REPL. The REPL allows you to enter
individual lines of code and have them run immediately. It's really handy if you're running into trouble with a particular
program and can't figure out why. It's interactive so it's great for testing new ideas.
To use the REPL, you first need to be connected to the serial console. Once that connection has been established,
you'll want to press Ctrl + C.
If there is code running, it will stop and you'll see
Press any key to enter the REPL. Use CTRL-D to reload.
Follow those
instructions, and press any key on your keyboard.
The
Traceback (most recent call last):
is telling you the last thing your board was doing before you pressed Ctrl + C
and interrupted it. The
KeyboardInterrupt
is you pressing Ctrl + C. This information can be handy when
troubleshooting, but for now, don't worry about it. Just note that it is expected behavior.
If there is no code running, you will enter the REPL immediately after pressing Ctrl + C. There is no information about
what your board was doing before you interrupted it because there is no code running.
Either way, once you press a key you'll see a
>>>
prompt welcoming you to the REPL!
© Adafruit Industries
https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51
Page 59 of 183