Skip to content
Snippets Groups Projects
Commit dee0d40a authored by Quentin Bolsee's avatar Quentin Bolsee
Browse files

explanations on the prints

parent 60103d1c
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment