Skip to content
Advertisement

Can you import python libaries into microPython? [closed]

I have started a project and to test if it works, I used a Pi zero. It has buttons and then sends MIDI Messages to my PC, depending on what buttons are pressed. So a simple MIDI Controller.

Now I think that a Microcontroller, like the Pico would be better suitable for such a task, but it can only run MicroPython.

So my question is, wether you can import most or all of the python libaries into microPython or if I should use another MicroController that can run python.

Advertisement

Answer

So my question is, wether you can import most or all of the python libaries into microPython or if I should use another MicroController that can run python.

While MicroPython shares much of the syntax of Python (3.4), it is different enough that anything but the most trivial Python code will not run under MicroPython. In general, you should only expect to run code developed explicitly for MicroPython on a MicroPython capable device.

So my question is, wether you can import most or all of the python libaries into microPython or if I should use another MicroController that can run python.

I don’t believe there are any microcontrollers available that can run standard Python. The smallest device you’re going to find is probably something like the Raspberry Pi Zero.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement