Skip to content
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

Host interface change from UART to I2C/SPI #13

Open
deepkap opened this issue Jan 7, 2025 · 8 comments
Open

Host interface change from UART to I2C/SPI #13

deepkap opened this issue Jan 7, 2025 · 8 comments
Assignees
Labels
sscma-example-we2 Label for sscma-example-we2 UAY Unassigned yet

Comments

@deepkap
Copy link

deepkap commented Jan 7, 2025

How to change interface protocol between we2 and host MCU?
Example: sscma

@LynnL4
Copy link
Member

LynnL4 commented Jan 7, 2025

I’m not quite sure I understand your question. The default firmware provides serial ports (USB serial and hardware serial) and I2C as protocol entry points. You can use the following serial port library to retrieve results: Seeed Arduino SSCMA.

Let me know if you need further clarification!

@deepkap
Copy link
Author

deepkap commented Jan 7, 2025

Yes I'm using same library. This Arduino SSCMA library have option of changing communication interface between we2 and ESP32S3.
AI.begin(&Wire, D3);
AI.begin(&SPI, D1, D0, D3, 15000000);

By default we2 send data on serial port. What changes are required on we2 SDK side to change this interface type from serial to I2C/SPI?

@LynnL4
Copy link
Member

LynnL4 commented Jan 7, 2025

The I2C commands will return results via the I2C bus, and serial commands will return results through the serial port. You can refer to this example: proxy_i2c.ino.

Also, Grove Vision AI v2 doesn’t support SPI communication since it’s used for the SD card.

@deepkap
Copy link
Author

deepkap commented Jan 7, 2025

Does Grove Vision AI v2 support I2C? If yes where in SDK i need to change?

@LynnL4
Copy link
Member

LynnL4 commented Jan 7, 2025

Supported. It supports I2C as well as uart, and you don't need to chagne anything.

@LynnL4
Copy link
Member

LynnL4 commented Jan 7, 2025

@deepkap
Copy link
Author

deepkap commented Jan 7, 2025

I just checked proxy_i2c example. It's not getting any data from we2.
image

@LynnL4
Copy link
Member

LynnL4 commented Jan 8, 2025

It' is a program that forwards AT commands received via the ESP32's serial port, sends them through I2C to the Vision AI, and then returns the results via the serial port. Please note that when entering AT commands, you still need to include the carriage return and newline (\r\n).

The program works as follows:

  1. ESP32 receives AT commands through the serial port (UART).
  2. The AT command is forwarded via I2C to the Vision AI.
  3. Vision AI processes the command and responds via I2C.
  4. ESP32 sends the response back to the serial port for output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sscma-example-we2 Label for sscma-example-we2 UAY Unassigned yet
Projects
Status: No status
Development

No branches or pull requests

3 participants