w4ilun / edison-guides

Convenient location for all things Edison
105 stars 31 forks source link

Running a Cylon-based node sample produces callback errors #4

Open craigm26 opened 9 years ago

craigm26 commented 9 years ago

I was able to run the blink.js with Intel XDK after following :

https://github.com/intel-iot-devkit/edison-guides/wiki

and applied it to the sample code listed here: http://cylonjs.com/documentation/drivers/lidar-lite/

After running the sample in XDK through node and serial node (as a standalone file in /root), I'm producing the same errors - "ERROR: Callback already called" x about ten lines. Is this because when Cylon is built, the sample is already there? Do I just comment out or delete the example files or do I run the sample files from the Edison directly? -

$ node /etc....whatever the file path is to the sample loaded by the cylon library

EDIT: I should note that I am trying to use LiDAR-Lite and will be using that as a web-socket to report measurements. I did change the package.json to reflect the new name of the lidarlite.js as "main.js"

rexstjohn commented 9 years ago

Hello, can you share your code file for activating the Lidar?

With Edison you have to make some modifications to include references to using the Edison device. If you copy / pasted the exact Lidar sample you linked it won't work without some tweaks. I can help take a look.

craigm26 commented 9 years ago

ah - yeah - that's I thought - I was able to run the generic samples from the Cylon package hosted on GitHub and not as well-versed on additional tweaks to make the LiDAR sample run. I've been extraordinarily busy lately - I'll see what I can do to post the error image from the xdk - it's the same output error made in XDK (serial and wifi) and Putty (serial). The XDK does have a debug editor which shows the file directory but still not well-versed enough to know exactly what I need to do to fix those errors.

craigm26 commented 9 years ago

repository where Arduino code works for me: https://github.com/PulsedLight3D/LIDARLite_Basics/tree/master/Arduino/LIDARLite_Wire_Library_GetDistance_ContinuousRead