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

Can Indicator RP2040 pull the image from Vision V2 faster? #49

Closed
Love4yzp opened this issue Feb 26, 2024 · 1 comment
Closed

Can Indicator RP2040 pull the image from Vision V2 faster? #49

Love4yzp opened this issue Feb 26, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Love4yzp
Copy link
Collaborator

There are two problems:

  • Using I2C port, there is very limited speed to get the image.
  • When using UART, the Baud speed of Vision V2 default is 921600. there is no suitable cable for Indicator to connect.
@Love4yzp Love4yzp added the enhancement New feature or request label Feb 26, 2024
@Love4yzp Love4yzp self-assigned this Feb 26, 2024
@Love4yzp
Copy link
Collaborator Author

When Using RP2040, it must using the hardware UART instead of software entity.
Doing so, you'll need to modify the pins_arduino.h, which you can edit locally.
according to the datasheet of pico, I modified as follow:

#pragma once


// Serial
#define PIN_SERIAL1_TX (16u)
#define PIN_SERIAL1_RX (17u)

//#define PIN_SERIAL2_TX (8u)
//#define PIN_SERIAL2_RX (9u)
#define PIN_SERIAL2_TX (20u)
#define PIN_SERIAL2_RX (21u)

// SPI
#define PIN_SPI0_MISO  (0u)
#define PIN_SPI0_MOSI  (3u)
#define PIN_SPI0_SCK   (2u)
#define PIN_SPI0_SS    (1u)

#define PIN_SPI1_MISO  (12u)
#define PIN_SPI1_MOSI  (11u)
#define PIN_SPI1_SCK   (10u)
#define PIN_SPI1_SS    (13u)

// Wire
#define PIN_WIRE0_SDA  (20u)
#define PIN_WIRE0_SCL  (21u)

#define PIN_WIRE1_SDA  (26u)
#define PIN_WIRE1_SCL  (27u)

#define SERIAL_HOWMANY (3u)
#define SPI_HOWMANY    (2u)
#define WIRE_HOWMANY   (2u)

#include "../generic/common.h"

Be attention of the WIRE0, as it connot be comment and I didn't change it. so if you want to use I2C, use WIRE1 instead.

wire.begin() // do not use it
wire1.begin() // yes

So, For Indicator, RP2040 connect to PC via USB2.0, Serial1 to inner ESP32 and Serial2 via grove(20,21).
Serial2 will support the high speed baud, as now it's harware configured.

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

No branches or pull requests

1 participant