I'm trying read tfmini lidar sensor from arduino due board with uart. Here i can read only one byte at a time using serail.read() method but i need to read 9 byte at a time and store it in array. Means i don't want to repeat loop again and again to store byte by byte.
7
-
Serial is only one byte. If something send multiple bytes then you have to read each individual byte. – Majenko♦ Jul 12 '20 at 8:22
-
arduino.cc/reference/en/language/functions/communication/serial/… – Juraj Jul 12 '20 at 8:24
-
Majenko, That means i have to repeat the loop untill a would not get the last data!!! – Rohit Jul 12 '20 at 8:49
-
You would have to repeat a loop. Not necessarily "the" loop. But it depends how "blocking" you are happy for your code to be. – Majenko♦ Jul 12 '20 at 9:39
-
Do we have any UART interrupt in arduino due board? – Rohit Jul 12 '20 at 10:20
|
Show 2 more comments