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

Thread: Teensy 4 and LidarLite V3 3d Scanning.

  1. #1
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,299

    Teensy 4 and LidarLite V3 3d Scanning.

    Recently have been getting back into robotics and started playing again with using LIDAR for obstacle avoidance and 3d Room Scanning. Experimented with using the Neato XV-11 and LidarLite v4LED but finally settled on using the LidarLite v3 (see Sparkfun product page: https://www.sparkfun.com/products/14032).

    Doing a bit of googling found a project that exactly suited my needs that was done using the v3 and an Arduino, Arduino Based Lidar Scanner. Even came with a Processing sketch to display a PointCloud. So with a bit of modification to suit my needs was able to get it working on a T4. Not much really needed:
    1. Added Distance measurement to send to the Processing Sketch
    2. Modified the Processing to display points in various colors for points based on distance from the sensor
    3. Added about to save point cloud and read it back in to processing with out having to rescan.
    4. Deleted the output to LCD display and manual mode control in the Arduino sketch.


    On the hardware side used an level shifter for two HS-645MG servos on the pan/tilt platform from ServoCity. For a power supply used a Anker power pak suppling 5v to the servos and the Lidar Lite v3. Here a couple of screen shots from the Processing sketch:
    Click image for larger version. 

Name:	Capture5.JPG 
Views:	7 
Size:	69.4 KB 
ID:	18301 Click image for larger version. 

Name:	Capture.PNG 
Views:	6 
Size:	18.3 KB 
ID:	18302
    with a couple color schemes.

    Next was to hack up a version of the initial sketch as a standalone project to use either a RA8875, ILI9488 or a ILI9341. For this test I am using a RA8875 display using a updated RA8875 library that supports the T4: https://github.com/mjs513/RA8875. You can check out this discussion on its development: https://forum.pjrc.com/threads/57280...ghlight=RA8875. Also incorporated the ArduinoGL_t3 library at this point that supports basic OpenGL v1 features like rotation, scaling, and translating to try and mirror some of the commands in the Processing sketch.

    Here is a photo of the setup for that piece of the project:
    Click image for larger version. 

Name:	IMG-0039.jpg 
Views:	6 
Size:	182.5 KB 
ID:	18303
    An initial screen shot of the scan on my desk is shown below:
    Click image for larger version. 

Name:	IMG-0037.jpg 
Views:	6 
Size:	81.6 KB 
ID:	18304

    Still working on improving the whole thing.

    An initial commit for the project is on GitHub but with out much instructions yet though: https://github.com/mjs513/Lidar-Lite-v3-3d-Scanner

    More to come soon.

    EDIT:
    Forgot to add.
    For the ILI9488 you will need the ILI9488_t3 library: https://github.com/mjs513/ILI9488_t3
    For the ILI9341 you will need the ILI431_t3n library: https://github.com/KurtE/ILI9341_t3n/ and the SPIN Library: https://github.com/KurtE/SPIN.
    Last edited by mjs513; 11-30-2019 at 05:26 PM.

Posting Permissions

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