Hi,
I am working with the Grand BANNED M4 board and CircuitPython. I am loading the example "sd_read_simpletest.py" file into the PyCharm Community Edition 2020.3.4 to run, but I keep getting the above error messages "ModuleNotFoundError: No module named 'busio'". I get the same error message on 'Thonny';;
import busio
ModuleNotFoundError: No module named 'busio'
Let me know please.
Regards.
ModuleNotFoundError: No module named 'busio'
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- dastels
- Posts: 15820
- Joined: Tue Oct 20, 2015 3:22 pm
Re: ModuleNotFoundError: No module named 'busio'
Are you sure you are running the code in CircuitPython on the Grand Central? The busio module is part of CircuitPython. It's always there.
Dave
Dave
- Giv
- Posts: 34
- Joined: Sat Aug 06, 2016 1:52 pm
Re: ModuleNotFoundError: No module named 'busio'
Hi,
Yes, please see screen shot attached. You see the drive circuitpy "E:" and Thonny screen with the error message;
That is Not the only issue. I have had no luck in accessing the SD card on the Grand Central M4 with Circuitpy or Arduino. Dcoumentation is minimal. Help please.
Thanks.
Givi
Yes, please see screen shot attached. You see the drive circuitpy "E:" and Thonny screen with the error message;
That is Not the only issue. I have had no luck in accessing the SD card on the Grand Central M4 with Circuitpy or Arduino. Dcoumentation is minimal. Help please.
Thanks.
Givi
- Attachments
-
- Screenshot-busio.jpg (396.33 KiB) Viewed 169 times
- dastels
- Posts: 15820
- Joined: Tue Oct 20, 2015 3:22 pm
Re: ModuleNotFoundError: No module named 'busio'
No, as the screenshot shows.
I don't really understand the Windows drive stuff, but you are not running the code in CircuitPython on the GrandCentral. It would have to be directly on CIRCUITPY, named with code.py or main.py.
Also, if the error was coming from CircuitPython it would look like:
Also, the error pane also says , meaning the code is running in the Python that's part of Thonny.
As for using the SD card, see https://learn.adafruit.com/adafruit-mic ... cuitpython for details on using it from CircuitPython. The grand Central has ,a separate, dedicated SPI bus for the SD card, so when you construct the busio.SPI object, use: SD_CS, SD_MISO, SD_MOSI, and SD_SCK from the board module. In C++ use SPI1 to connect to the card which will be used automatically by the SD library
. See https://learn.adafruit.com/adafruit-mic ... no-library.
Dave
I don't really understand the Windows drive stuff, but you are not running the code in CircuitPython on the GrandCentral. It would have to be directly on CIRCUITPY, named with code.py or main.py.
Also, if the error was coming from CircuitPython it would look like:
Code: Select all
>>> import blah
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'blah'
Code: Select all
"Python 3.7.9" (bundled)
As for using the SD card, see https://learn.adafruit.com/adafruit-mic ... cuitpython for details on using it from CircuitPython. The grand Central has ,a separate, dedicated SPI bus for the SD card, so when you construct the busio.SPI object, use: SD_CS, SD_MISO, SD_MOSI, and SD_SCK from the board module. In C++ use SPI1 to connect to the card which will be used automatically by the SD library
. See https://learn.adafruit.com/adafruit-mic ... no-library.
Dave
Please be positive and constructive with your questions and comments.