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.

  • 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
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.