Hi,
I have an Grove-TF Mini LiDAR, that I can’t get working using my Seeeduino LoraWan. I connected the Tx and Rx wires to pin 0 and 1 and used the code of Seeed ( http://wiki.seeedstudio.com/Grove-TF_Mini_LiDAR/ ). But the Seeeduino isn’t printing anything on the screen.
[code]
void setup()
{
Serial1.begin(115200);
SerialUSB.begin(115200);
}
void loop()
{
while(Serial1.available()>=9)
{
if((0x59 == Serial1.read()) && (0x59 == Serial1.read())) //Byte1 & Byte2
{
unsigned int t1 = Serial1.read(); //Byte3
unsigned int t2 = Serial1.read(); //Byte4
t2 <<= 8;
t2 += t1;
SerialUSB.print(t2);
SerialUSB.print('\t');
t1 = Serial1.read(); //Byte5
t2 = Serial1.read(); //Byte6
t2 <<= 8;
t2 += t1;
SerialUSB.println(t2);
for(int i=0; i<3; i++)
{
Serial1.read(); ////Byte7,8,9
}
}
}
}