TERARANGER lidar DATA reading


I need to read the data from a lidar (trararanger one), with UART interface.

Thing is i've never used an arduino before and i can barely code in C (I hope i will learn on the job ^^) so I am a bit lost...

I've tried some basic tutorials to get in touch with arduino (i can light up a RGB LED whohoo!! ;)). So I've linked the lidar to the arduino (RX/TX/Vcc/GND well done ;p) but now i need the code to read the data from the computer...

Does someone have some code templates/examples/explanations or smth to help me ?


ps : these are some specs that might help : The UART is configured to send and receive at 115200 bit/s, 8 data bits, no parity bit and one stop bit (115200­8N1). Vcc (10V, accepts 10­20V)


Serial input basics If the interface is RS232, you will need an RS232 to TTL serial adapter, or the Arduino could be destroyed.

Cool ! Thanks !

I’ve tried the exemple n°5 (copy/paste/transfer) but it doesn’t work. I’ve measured the voltage between gnd and vcc there is 5V, the sensor is designed to work with 10V input, can my arduino mega provide such voltage ?

the only error that the soft returns me is :
avrdude: stk500v2_ReceiveMessage(): timeout

I’ve juste copy/paste the code cuz I’ve no idea of what to change/add, but i guess that’s not that easy isn’t it ?

Oops sorry my bad it’s running with 5V in uart mode…

here is the data sheet : http://www.teraranger.com/wp-content/uploads/2016/01/TeraRanger-One-Specification-Sheet1.pdf

The sensor should be powered by a separate power supply, minimum 10V. Connect the sensor ground and Arduino grounds together.

You can't connect the Arduino serial port to a sensor and also upload programs. There are "software serial" programs that effectively add another serial port, but they don't work at 115200 baud.

To use the sensor at the 115200 Baud rate, you will need an Arduino Mega, which has four hardware serial ports.

I am on an arduino Mega and connected on rx0 tx0, but still it does not work properly =(

connected on rx0 tx0, but still it does not work properly =(

Of course not. See reply #4.


If you are still interested, you can find the code for reading TeraRanger One from Arduino in my GitHub repository here:


regards, mihai