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

Thread: T3.5 w/ Lidar Lite V3 - Nothing but Nacks!

  1. #1

    T3.5 w/ Lidar Lite V3 - Nothing but Nacks!

    Hey guys, I'm trying to get my Teensy 3.5 to work with a Lidar Lite V3, but I'm getting all nacks.

    Setup:
    - 4.7K external pullups to 5V
    - Using port I2C2 (pins 3 and 4)

    Schematic/Board Layout:
    Click image for larger version. 

Name:	IFC_schematic.jpg 
Views:	34 
Size:	62.4 KB 
ID:	13805
    Click image for larger version. 

Name:	IFC_layout.jpg 
Views:	34 
Size:	162.8 KB 
ID:	13806

    Code:
    Code:
    #include <Wire.h>
    #include <LIDARLite.h>
    
    
    
    LIDARLite myLidarLite;
    
    
    
    void setup()
    {
      pinMode(13,OUTPUT);
      digitalWrite(13,HIGH);
      
      Serial.begin(115200);
    
      Wire.setSDA(4);
      Wire.setSCL(3);
    
      myLidarLite.begin(0, true); // Set configuration to default and I2C to 400 kHz
      myLidarLite.configure(0);
    }
    
    void loop()
    {
      // Take a measurement with receiver bias correction and print to serial terminal
      Serial.println(myLidarLite.distance());
      delay(10);
    
      // Take 99 measurements without receiver bias correction and print to serial terminal
      for(int i = 0; i < 99; i++)
      {
        Serial.println(myLidarLite.distance(false));
        delay(10);
      }
    }
    Any thoughts?

  2. #2
    Nvm, I got it to work!

    I used the "extern TwoWire Wire2;" method found here: https://forum.arduino.cc/index.php?topic=216359.0.

    Unfortunately, I had to change the LiDAR Lite library with the above patch in order for it to work.

Posting Permissions

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