TOF CAM Sensor
-
Hi all,
can M5Stack "talk" serially with this sensor?
datasheet say it needs a TTL UART interface:
Baud rate 10 Mbit/s 1 bit = 0.1 µs
Start bits 1 Bit low active
Data 8 Bit
Stop bits 1 Bit high active
Parity No
Voltage level LVTTL 3.3 Vhappy new year!!!
-
Hi just want to clear up if you are talking about the tof hat for stick c or the tof unit?
-
Hi, according to datasheet it can.
I mean, ESP32 which is M5stack based on canHowever, it needs to be tried with UIFlow.
Can do with Arduino / Micropython most likely
-
@cepics code probubly doesn't exist for it as the tofs are VL53 based.
-
@lukasmaximus I'm talking about this sensor module: TOF>cam 635 I need to talk with it serially. is it possible?
-
@thrasher I'm in Arduino environment ..
How can I set up a serial communication with this sensor?
tnks a lot
-
@ajb2k3 tnks for answering ..
for the moment I need just to send/receive commands/response serially....
-
@cepics should work with serial.begin(params)
Then use any com port software, teraterm or termite and try to "talk" with sensor -
the sensor want:
Baud rate 10 Mbit/s 1 bit = 0.1 µs
Start bits 1 Bit low active
Data 8 Bit
Stop bits 1 Bit high active
Parity No
Voltage level LVTTL 3.3 Vcan I try something like that?
#include <M5Stack.h> #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())); } }
-
You need just one Serial;
Serial.begin(10000000);
//connect to proper TX<>RX pins of M5StackFor proper debug you can connect sensor with any USB<>UART board and try to run it with any terminal software (I use TeraTerm)
If you want to debug derictly with M5Stack you will need Serial2 as your example shows, but keep in mind that if its a software serial, such high speed wont work properly most likely