Replies: 1 comment 2 replies
-
Please check your SPI pins and reconnect your wiring accordingly. On my ESP32-C3 MPY: soft reboot
MicroPython v1.20.0-332-gb714f4181-dirty on 2023-08-20; ESP32C3 LUATOS-A12-USB (KAKI5) with ESP32C3
>>> import machine
>>> s1 = machine.SPI(1)
>>> s1
SPI(id=1, baudrate=500000, polarity=0, phase=0, bits=8, firstbit=0, sck=6, mosi=7, miso=2)
>>> i.e. the default pins for SPI1 are sck on GPIO-6, mosi on GPIO-7 and miso on GPIO-2 or you can redefine the pins as you wish. >>> from machine import Pin, SPI
>>> spi = SPI(1, baudrate=100000, polarity=0, phase=0, sck=Pin(4), mosi=Pin(6), miso=Pin(5))
>>> spi
SPI(id=1, baudrate=100000, polarity=0, phase=0, bits=8, firstbit=0, sck=4, mosi=6, miso=5)
>>> |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to work with this new module based on an esp32 C3 Super Mini. My intention is to connect an RC522 model RFID board with this device. In an ESP32 S3 the code works correctly.
When I pass the code to c3, it doesn't work. I think I have everything set up correctly, but it doesn't work.
Can you guide me to what could be happening to me?
Conexion RC522 <-> ESP
cs = 7
mosi = 6
sck = 4
miso = 5
rst = 3
`
import mfrc522_mia
from machine import Pin,SPI
from utime import ticks_ms
spi = SPI(1, baudrate=1000000, polarity=0, phase=0)
spi.init()
rdr = mfrc522_mia.MFRC522(spi=spi, gpioRst=3, gpioCs=7)
print("Place card")
def do_read():
do_read()
`
Libreria :
`from machine import Pin, SPI
from os import uname
emptyRecv = b""
class MFRC522:
Beta Was this translation helpful? Give feedback.
All reactions