Autorun UART Mode/les

Hi,
on the raspberry pi I’m creating an application which reads the distance between one tag and one anchor (nothing more needed) I’m doing it via serial connection. It works very well, but only if I open the UART mode with minicom and double return. When I try to send an command (eg. “\r\r”) without having done that the response is only an “@”-sign. My question is, is it possible to run the les command at startup via script or something else. Or is there a better way to obtain the distance data (I’m parsing the string “CA2F[1.00,1.00,1.00]=1.12 \r” in an Qt/C++ application)?

Hi Ankalagon,

This is what I used in python :

        self.ser.write(b'\r')  # write a string
        sleep(0.2)
        self.ser.write(b'\r')  # write a string
        sleep(1) 

It works fine.

Hope it helps,
Yves

Wow, that did it.
Can’t thank you enough!