Hello everybody,
I just got a Pyboard V1.1 and I'm encountering a small problem... (I'm really a beginner...)
For information, I'm using a Mac and Pyzo 4.4.2 with Anaconda.
My problem is the following : I plug the Pyboard with a micro-USB/USB cable to my Mac, then the board shows up on my desktop. I open the folder (which looks like a storage device and is named PYBFLASH) and there are the main.py/boot.py/pybcdc.inf and README.txt files in it. I double-click on the main.py file and it opens itself in Pyzo. Then, whenever I try to write "import pyb" or "from pyb import ...", I get the following message "ModuleNotFoundError: No module named 'pyb' ". I also tried "upyb"/"machine" and "umachine" but none of them are working.
So I would like to know if there is any solution
Thank you for your answers
Theo.D
No module named pyb
Re: No module named pyb
It sounds like you might be trying to run the files on your Mac rather than on the pyboard.
Pyzo is a python interpreter that runs on the Mac, so it won't be able to find the pyb module.
You need to use a serial terminal program to connect to the serial port and get into the Micropython REPL. Then import pyb will work.
Pyzo is a python interpreter that runs on the Mac, so it won't be able to find the pyb module.
You need to use a serial terminal program to connect to the serial port and get into the Micropython REPL. Then import pyb will work.