Open Evelios opened 3 months ago
micropython-rp2-pico-stubs
.import sys; print( "version:", sys.version, "port:", sys.platform)
typings
module, you need to install the stubs into a typings
folder in the project
pip install -U micropython-rp2-pico-stubs --target ./typings --no-user
python -m mpremote mip install github:josverl/micropython-stubs/mip/typing.mpy
# and where needed also:
python -m mpremote mip install github:josverl/micropython-stubs/mip/typing_extensions.mpy
Installing the typing.mpy
stubs onto the Pico cleared up this issue and the new current compile issue is
Traceback (most recent call last):
File "main.py", line 20, in <module>
File "main.py", line 15, in main
File "spaceteam.py", line 22, in __init__
File "hardware/pin_manager.py", line 26, in __init__
File "hardware/mcp23017.py", line 182, in __init__
File "hardware/mcp23017.py", line 186, in init
AttributeError: 'int' object has no attribute 'scan'
The I2C scan was called on an int because the parameter arguments for the Mcp23017
were in the wrong order. The game now runs, but there are connection issues with the Mcp23017
. I need to now go through and do hardware verifications of the different parts of the board. The current software crash is
Traceback (most recent call last):
File "main.py", line 20, in <module>
File "main.py", line 15, in main
File "spaceteam.py", line 22, in __init__
File "hardware/pin_manager.py", line 26, in __init__
File "hardware/mcp23017.py", line 184, in __init__
File "hardware/mcp23017.py", line 189, in init
OSError: MCP23017 not found at I2C address 0x20
Running the current code errors our with
ImportError: No module named 'typing'
. This is a result of using the MicroPython library which doesn't include thetyping
module by default. The easiest way of fixing this issue is through the MicroPython Stubs library. This allows for the use of typing library for static type checking without the overhead at runtime.