Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Lidar array, i2C and UART

  1. #1
    Junior Member
    Join Date
    Nov 2019
    Posts
    3

    Lidar array, i2C and UART

    Hello!

    I'm more of a musician and a designer than a software or electrical engineer, but I can muddle my way through circuits and code well enough to make prototypes.

    I'm working on a musical instrument that uses an array of lidar sensors as input. I've done some research and shopping and decided on the Benewake TF MINI Plus. I've managed to run someone's test code for an older version of this Lidar unit and verify that these sensors will work well for my design (good range of detection, good readings from hands/arms, little crosstalk from fairly adjacent sensors).

    These devices can communicate by both UART and i2C depending on how they are set up. My next challenge is to address an array of about 10 of these sensors, either using a single Teensy with i2C, or two Teensys with UART (I would need two Teensy 3.6s to get enough UART buses for each sensor). I have little experience writing code, and very little experience with these communication protocols. I'm interested in the shortest path to a rock solid functioning sensor array.

    Can anyone suggest which of these protocols might be easier for me to implement? Can you link me to any tutorials or other learning resources which would help a n00b quickly learn how to properly implement i2C or UART in this project?

    Thanks!
    Moldover

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,719
    Note: my quick look through the document, I only see it mention using Serial communications, so not sure if it supports Wire?

    I know that the Sparkfun Lidar Lite: https://www.sparkfun.com/products/15777 supports Wire...

    I believe the Lidar Lite V4 allows you to set the I2C address for these, so that you can setup one I2C Buss to handle multiple of these devices. Can one buss run 10 of them? Don't know.

    How to hook up 10 of them? So going with the like you provided, would as you mention probably require 2 T3.6/5 to handle that many UARTS.

    Or on the Wild side, you might be able to handle all 10 of them on one T4... No easy guarantees, but on T4:
    Top pins: 5 Uarts
    Bottom pins: 2 Uarts

    So we have 7 so far we need 3 more:
    And might be able to make 3 Serial objects using FlexIO. I have not done much testing of multiple FlexIO Serial objects used for RX, but did fix it to work with multiple TX outputs, more details on the thread: https://forum.pjrc.com/threads/58228...rary-FlexIO_t4

    But again this might be too risky.

  3. #3
    Junior Member
    Join Date
    Nov 2019
    Posts
    3
    Hi ,

    Thanks for the quick reply @KurtE. I went for the TFMini Plus because it has some desirable features that the Lidar Lite V4 doesn't, but I have access to one of those so I will try to see if using it with Wire is any easier than i2c or Uart.

    I got a Teensy 4 thinking it would be a great solution but unfortunately it does not support functioning as a class-compliant MIDI device yet, which is one of the project requirements.

    I'll take a look at that FlexIO library. Thanks!

    ( ! )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •