Skip to content

Problem with SPI #300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
NYFB8888 opened this issue Feb 16, 2025 · 1 comment
Open

Problem with SPI #300

NYFB8888 opened this issue Feb 16, 2025 · 1 comment

Comments

@NYFB8888
Copy link

Following the instructions, I built the lv_micropython image but I have a problem with the instantiations of the SPI class. The first snippet shows the instantiation of the SPI class in the MicroPython environment.

MicroPython v1.24.1 on 2024-11-29; Generic ESP32S3 module with ESP32S3

from machine import SPI
help(SPI)
object <class 'SPI'> is of type type
init --
deinit --
read --
readinto --
write --
write_readinto --
MSB -- 0
LSB -- 1
print(dir(SPI))
['class', 'name', 'read', 'readinto', 'write', 'LSB', 'MSB', 'bases', 'dict', 'deinit', 'init', 'write_readinto']

End the same as lv_micropython.

LVGL (9.2.2) MicroPython (1.24.1) Binding compiled on 2025-02-16; Generic ESP32S3 module with Octal-SPIRAM with ESP32S3
Type "help()" for more information.

from machine import SPI
help(SPI)
object <class 'SPI'> is of type type
name -- SPI
Bus -- <class 'Bus'>
Device -- <class 'Device'>
print(dir(SPI))
['class', 'name', 'Bus', 'Device', 'bases', 'dict']

from machine import Pin, SPI

Initialize SPI

spi = SPI(1, baudrate=1000000, polarity=0, phase=0, sck=Pin(12), mosi=Pin(11), miso=Pin(13))
Traceback (most recent call last):
File "", line 3, in
TypeError: can't create 'SPI' instances

@kdschlosser
Copy link
Collaborator

You have not read the README.md file because it goes over all of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants