loading

This instructable is for users who wish to interface the LV Ez series Maxbotix sensors to the Edison with arduino breakout board, with cylonjs or johhny-five.

Step 1: Things You Will Need.

1) Edison with arduino breakout board.

2) Grove base shield.

3) Any LV-Max EZ series sensor.

Step 2: Solder the Correct Pins

We will use the analog output pin along-with with the obvious VCC/Ground.

Solder the VCC/ground to appropriate pins of the JST connector as shown.

The tricky part is that the grove base shield is a 4 pin board and we need only 3 pins here.

Solder the analog pin output (AN) to the 4th pin of the connector, NOT 3rd.

At this stage, we are good to go. Power up the edison and connect the sensor to any of the pins A0-A3.

Step 3: Program Using Cylonjs

Use the following code to get the sensor readings. The code provided by the cylonjs website needs to be changed in one line as indicated by my program.

Also, keeping the ranging frequency to 1s is optimal. 0.5s also works but the errors increase slightly. Below 0.5s, the readings are increasingly erratic

Step 4: Code

var Cylon = require('cylon');
Cylon.robot({ connections: { edison: { adaptor: 'intel-iot' } }, devices: { maxbotix: { driver: 'maxbotix', pin: 1 } // connect sensor to pin A1 }, work: function(my) { every((1).seconds(), function() { my.maxbotix.range(function(err,data) { // in website, it shows just function(data) and says range: data, however this is WRONG and one needs to change it to the above. Only then, the data is valid distance measured. console.log("range: " + data + " error: " + err); }); }); } }).start();

<p>Nice project. Thanks for sharing</p>

About This Instructable

377views

4favorites

More by helloerror:Maxbotix Lv-EZ sensor with Cylonjs and Edison Arduino breakout board 
Add instructable to: