ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    VOXL2 J19 QUP3

    Ask your questions right here!
    2
    10
    59
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • voxltesterV
      voxltester
      last edited by

      Hi,
      I connected Lightware LW20/C on one of the I2C port on VOXL2 J19.
      It is QUP3, and the pins I used are

      7	I2C3 SDA 3P3V	slpi_proc, SSC_QUP3
      8	I2C3 SCL 3P3V	slpi_proc, SSC_QUP3
      

      and power & ground.
      I also installed a customized voxl-px4 which will start lightware_laser_i2c with the I2C address 0x66.
      On VOXL2, I edited voxl-px4.conf file by adding DISTANCE_SENSOR=LIGHTWARE_SF000.
      However, I cannot see any parameter regarding rangefinder... like SENS_EN_SF1XX.

      I have done using LW20/C with UART connection successfully, but I2C does not work..
      Can anyone give me any advise to use it via I2C?

      Eric KatzfeyE 1 Reply Last reply Reply Quote 0
      • Eric KatzfeyE
        Eric Katzfey ModalAI Team @voxltester
        last edited by

        @voxltester That is not a normal option to choose via voxl-px4.conf. You will need to hand modify the startup script /usr/bin/voxl-px4-start to properly start the driver in i2c mode. Use option -b 4 to select that i2c bus.

        voxltesterV 1 Reply Last reply Reply Quote 0
        • voxltesterV
          voxltester @Eric Katzfey
          last edited by voxltester

          @Eric-Katzfey

          Hi, Eric.
          I tried

          qshell lightware_laser_i2c start -a 0x66 # I2C address 102
          

          it did not work..

          So are you meaning

          qshell lightware_laser_serial start -b 4
          

          or

          qshell lightware_laser_i2c start -b 4
          

          ?

          Eric KatzfeyE 1 Reply Last reply Reply Quote 0
          • Eric KatzfeyE
            Eric Katzfey ModalAI Team @voxltester
            last edited by

            @voxltester I would try qshell lightware_laser_i2c start -b 4

            voxltesterV 1 Reply Last reply Reply Quote 0
            • voxltesterV
              voxltester @Eric Katzfey
              last edited by

              @Eric-Katzfey
              Eric, this is not working...

              Please refer to the driver for i2c....
              https://github.com/modalai/px4-firmware/blob/main/src/drivers/distance_sensor/lightware_laser_i2c/lightware_laser_i2c.cpp

              Default i2c address is defined 0x66 (102) in this code.
              I am wondering what is the i2c address of the VOXL2 J19 - QUP3 port.

              I am not familiar with the above cpp driver code... could you please have a look the code and teach me how to enable the i2c connection for the lightware rangefinder?

              Thank you in advance....

              Eric KatzfeyE 1 Reply Last reply Reply Quote 0
              • Eric KatzfeyE
                Eric Katzfey ModalAI Team @voxltester
                last edited by

                @voxltester We have never used the device that you are connecting so I am only offering suggestions to help out. When speaking of i2c addresses it is related to the device being attached to the bus, not the bus itself. You can attach multiple i2c devices to the same i2c bus if they have different addresses. But, there are multiple i2c buses to choose from. So, address 0x66 (which is default for that device and doesn't need to be specified on the command line) is for the device and port 4 specifies which i2c bus it is connected to. Also, please look at this file: https://github.com/modalai/px4-firmware/blob/main/src/drivers/distance_sensor/lightware_laser_i2c/parameters.c. There are 2 parameters that need to be set properly for the driver to work. If the default values are not correct then you will need to set them accordingly. For SENS_EN_SF1XX it should be set to 6 for LW20/c.

                voxltesterV 1 Reply Last reply Reply Quote 0
                • voxltesterV
                  voxltester @Eric Katzfey
                  last edited by

                  @Eric-Katzfey
                  Understood. I just figured out address and bus. I am sorry for disturbing you for the basic concept.

                  Now, I am trying to run it with SENS_EN_SF1XX=6, the command in px4-start is just qshell lightware_laser_i2c start.

                  By the way, I am wondering where the bus info is described in the driver cpp file. Should I change the code? Because lightware_laser_i2c accepts only R as an option..

                  Eric KatzfeyE 1 Reply Last reply Reply Quote 0
                  • Eric KatzfeyE
                    Eric Katzfey ModalAI Team @voxltester
                    last edited by

                    @voxltester It's all done in the base class. See: https://github.com/modalai/px4-firmware/blob/main/platforms/common/i2c_spi_buses.cpp

                    voxltesterV 1 Reply Last reply Reply Quote 0
                    • voxltesterV
                      voxltester @Eric Katzfey
                      last edited by

                      @Eric-Katzfey
                      the versions of px4 are different...
                      I am git clone from https://gitlab.com/voxl-public/voxl-sdk/services/voxl-px4
                      in which there is only one parameter in https://github.com/modalai/px4-firmware/tree/0a47ec5d8650f4e97f1eb929405df5dcdb91989f/src/drivers/distance_sensor/lightware_laser_i2c

                      Anyway, qshell lightware_laser_i2c start is not working with I2C port on VOXL2 J19 - QUP3

                      Eric KatzfeyE 1 Reply Last reply Reply Quote 0
                      • Eric KatzfeyE
                        Eric Katzfey ModalAI Team @voxltester
                        last edited by

                        @voxltester Why are you not adding -b 4?

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Powered by NodeBB | Contributors