2021-04-22 02:53 PM
Hi there,
I am working with tfmini lidar and i am using USART3.However i am getting the garbage in the virtual port any idea how can i resolve this but i am getting the right header i.e YY in decimal.
Any suggestion would be appreciated.
Thanks
Solved! Go to Solution.
2021-04-29 08:20 AM
Hi John,
The sensor talk to stm using I2C? I Connected sensor as per datasheet using UART protocol using rx and tx lines.Do you mean to say it is something internally that changes it to i2c?The code i wrote is extremely simple.Getting data in interrupt mode,Raising a flag in callback function and use this flag in while loop
2021-04-29 11:13 AM
TeslaDelorean is correct. Read the data sheet for this device.
Each 8 byte data frame starts with a 0x5959 which happens to be ascii YY, but the remaining bytes are binary. Either convert the binary to ascii before sending to Tera Term, or use a terminal emulator that provides for a hex display that is easier to interpret than garbage.
The literature says the comm is USART/I2C. USART seems to be the default.
Cheers, Hal
2021-04-29 11:57 AM
Oh ok what you saying is tera term doesn't support the binary number.I didn't know that.i'll try another emulator or will convert it to hex.
2021-04-29 12:32 PM
What is the part number of the sensor you are using?
2021-04-29 04:55 PM
After much conversation, this is not an ST part. It's from Sparkfun, but based on an LED emitter and photo diode.