Hi everyone,
I connect with rshell to an ESP32 and rshell looks for via the function below which, because my code doesn't contain a file 'board.py' and thus always defaults to "pyboard". I can change that in a simple-minded kind of way by creating a 'board.py' file, but I'd prefer to adopt any standard or convention for 'board.py' if one exists. It turns out that ''board.py' and 'import board' make really poor search terms, so I'd like to ask if anyone knows where this file is found in the MicroPython ecosystem and whether there's a standard or convention for its contents?
Code: Select all
def board_name(default):
"""Returns the boards name (if available)."""
try:
import board
try:
name = board.name
except AttributeError:
# There was a board.py file, but it didn't have an name attribute
# We also ignore this as an error
name = default
...
return repr(name)