4 Replies Latest reply on Sep 19, 2014 5:08 PM by Intel_Alvarado

    Galileo + LPD8806 LED strip on Node.js?

    jd1000

      I'm trying to control an LPD8806 LED strip on the Galileo using Node.js. I run out of space when I install the Muzzley demo (v0od0oChild/MuzzleyGalileoDemos · GitHub), possibly because of some log files or some mistake I've made somewhere.

       

      I've tried starting from scratch as well. This library (muzzley/LPD8806-node · GitHub) looks very useful, but so far I can't figure how it tells the board, hey, the LPD8806 strip is on this data pin and this clock pin.

       

      Thanks in advance for any help!

        • 1. Re: Galileo + LPD8806 LED strip on Node.js?
          Intel_Alvarado

          Hi jd1000,

           

          Just to make sure, you are using the example found in the link you provided https://github.com/muzzley/LPD8806-node right? And you are using the code under the “Run” category after you installed the async repo? Make sure you have an Internet connection when you  use the npm command so that you can download and install correctly.

           

          Regards

          Sergio

          • 2. Re: Galileo + LPD8806 LED strip on Node.js?
            jd1000

            Yep, that's the code I'm most interested in. I have the async module installed, and after some struggles, npm is working reliably (good Ethernet connection).

             

            I've tried it with the strip plugged in with the clock wire going to pin 13 (SCK) and the data wire to 11 (MOSI?), but no luck so far. I checked if /dev/spidev1.0 exists on my Linux install and it does.

             

            My strip does work when I just run the AdaFruit LPD8806 sketch on my Uno, but I haven't had luck with either a sketch (the AdaFruit library doesn't work) or Node on the Galileo yet.

             

            When I run this code:

            var LPD8806 = require('lpd8806-async');

            var ledstrip = new LPD8806(71, '/dev/spidev1.0');

            console.log(ledstrip);

            ledstrip.fillRGB(0,0,255);

             

            I get:

            { spi: { _spi: {}, device: '/dev/spidev1.0' } }

             

            I also have the Muzzley demo working now theoretically (it logs pin changes to the console), but the lights don't light up. (Again, the lights do work, just not with Node so far.)

             

            Do I need to do something to get spi working right? I worry that I messed up the gpios by running a sketch without really understanding it. Is there a way to reset the device to factory settings?

             

            Thank you!

            • 3. Re: Galileo + LPD8806 LED strip on Node.js?
              Intel_Alvarado

              Hi jd1000,

               

              If you need to reset the device to factory settings I would recommend you to erase the image of the board on the SD card and install it again using the latest firmware available. You can download it again from here https://communities.intel.com/docs/DOC-22226 . The firmware can be upgraded in the Galileo IDE.

              If you only need to change the value of some of the gpio take a look at http://www.malinov.com/Home/sergey-s-blog/intelgalileo-configuringtheserialportinlinux .

               

              Regards

              Sergio

              • 4. Re: Galileo + LPD8806 LED strip on Node.js?
                Intel_Alvarado

                Hi

                We are following up on your post Galileo + LPD8806 LED strip on Node.js? and we would like to know if you still need help or if you already have an answer or solution to your question. Remember if someone replied to you with a helpful response you can mark it as correct or helpful answered. We will be waiting your response. Have a great day.
                Regards,

                Sergio