diff --git a/README.md b/README.md index 796ced8336d4840283c885becc624f6627bac095..2ecf4dcee49081df765f4d9fa2122361275fda7f 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,19 @@ values = d.read_inputs() print(values) # prints {2: 1, 6: 0, 15: 1} ``` -## Error handling +## Prints handling + +By default, print statements from the device are relayed and displayed as: + +```txt +MPY_PRINT@COM1:HELLO WORLD +``` + +These messages can be suppressed by passing `show_prints=False` when instantiating the device. + +For more complex message exchange, it's best to pass a string to the host computer with a `return` statement. + +## Exceptions handling Exceptions on the MicroPython side are turned into Python exceptions, which can help you debug the embedded code. You can catch them and react accordingly: