TOF CAM sensor
Posted: Mon Dec 30, 2019 4:50 pm
by cepics
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
Re: TOF CAM sensor
Posted: Wed Jan 01, 2020 2:51 pm
by CollinK
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.
Re: TOF CAM sensor
Posted: Thu Jan 02, 2020 8:07 am
by cepics
tnks for answering !!!
How can I set up serial comunication so fast?
Serial.begin(????????);
Re: TOF CAM sensor
Posted: Thu Jan 02, 2020 11:49 am
by cepics
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()));
}
}