TOF CAM sensor

cepics
Posts: 14
Joined: Sat Dec 08, 2018 10:13 am

TOF CAM sensor

Postby cepics » Mon Dec 30, 2019 4:50 pm

Hi all, is it possible to communicate with this [url]https://www.espros.com/downloads/02_Cam ... KJUwiw[url] sensor ?

it say TTL UART interface at 10 Mbit/s
I'm in arduino environment...

tnks a lot

CollinK
Posts: 18
Joined: Mon Apr 16, 2018 11:38 pm

Re: TOF CAM sensor

Postby CollinK » Wed Jan 01, 2020 2:51 pm

I suspect it will be difficult to make it work reliably. The ESP32 can toggle pins at 80MHz. So, a 10Mhz serial interface should be well within the limits of the hardware in terms of input and output speed at the pins. However, the general rule of thumb I've heard about serial ports on the ESP32 is that you can't expect to go over about 2-3MBits per second without hardware flow control. And, wouldn't you know, that camera does not use hardware flow control. So, I think you'll miss bytes when trying to receive at 10MBits. But, the only way to know is to try. It might be OK so long as you don't have anything else active at the time - no Wifi, no bluetooth, just serial reception.

cepics
Posts: 14
Joined: Sat Dec 08, 2018 10:13 am

Re: TOF CAM sensor

Postby cepics » Thu Jan 02, 2020 8:07 am

tnks for answering !!!

How can I set up serial comunication so fast?

Serial.begin(????????);

cepics
Posts: 14
Joined: Sat Dec 08, 2018 10:13 am

Re: TOF CAM sensor

Postby cepics » Thu Jan 02, 2020 11:49 am

something like that?

Code: Select all

#define RXD2 16
#define TXD2 17


void setup() {

  Serial.begin(115200);
  Serial2.begin(10000000, SERIAL_8N1, RXD2, TXD2); 
  Serial.println("Serial Txd is on pin: " + String(TX));
  Serial.println("Serial Rxd is on pin: " + String(RX));

}

void loop() { 
  while (Serial2.available()) {
    Serial.print(char(Serial2.read()));
  }
  }

Who is online

Users browsing this forum: No registered users and 70 guests