LIDAR-Lite


The LIDAR-Lite uses optical lasers to measure distances of up to 40 meters.

For more information click here.

How To Connect

Install the module with npm install cylon-i2c

Cylon.robot({
  connections: {
    arduino: { adaptor: "firmata", port: "/dev/ttyACM0" }
  },

  devices: {
    lidar: { driver: "lidar-lite" }
  },
});

How To Use

Example using the LIDAR-lite to measure distance:

"use strict";

var Cylon = require("cylon");

Cylon.robot({
  connections: {
    arduino: { adaptor: "firmata", port: "/dev/ttyACM0" }
  },

  devices: {
    lidar: { driver: "lidar-lite" }
  },

  work: function(my) {
    every(100, function() {
      my.lidar.distance(function(err, data) {
        console.log("distance: " + data);
      });
    });
  }
}).start();

Commands

distance

Returns the distance data for the LIDAR-Lite in cm.

Params

  • callback (Function) function to be invoked when done

Returns

  • (undefined)

Compatibility