I have an OpenMV model H7 R2 and I’m trying to send information via SPI bus from openMV to an ESP32. I have configured openMV as master using the pyb method, and I have configured the ESP32 as slave using specific library in arduino IDE.
In the openMV code after i configure andinitilize the SPI bus, i’m running a simple code inside a while loop to send 1 byte a time. On the ESP32 i’m running a simple code to read the byte received and print it on the serial terminal. But, i’m not getting anything on the ESP32. I’m using arduino IDE to program my ESP32.
I tested the ESP32 code using a raspberry pi 4 to send one byte through SPI and in that case it worked as expected.
On the other hand, i saw there is an SPI method on the machine library which i also tried to implement and it didn’t work either.
Lastly, i saw there is aslo an SPI method in the RPC library, and reading on other topics i saw you can implement the method using arduino downloading the openMV library, but when i tried to download it, is not working. I’m using arduino version 2.0.3.
My question is, what’s the proper way to implement SPI bus communication between OpenMV and other microcontrollers?
I uploaded the code i’m using on my openMV.
SPI_TEST1.py (345 Bytes)
I’ would appreciate any clarification on this topic.