adammhaile/RPi-LPD8806

LEDStrip Parameter

Closed this issue · 6 comments

Hello Mr Haile,

I'm trying to follow your instructions to play with the Adafruit LED-Strip on my Raspberry Pi. Unfortunately I am completely new to Raspbian and Python (and Github as well) and I don't understand one of your installation instructions.
You mention a second parameter of LEDStrip.
("Then set the second parameter of LEDStrip to True to enable py-spidev")
Where is this parameter? I have no idea where to look for it. Could you please help me out here?

best regards
Axel Langhoff

Axel,

That parameter is defaulted to False, which is why you generally don't see
it.
If you wanted to you use it you would just do:
led = LEDStrip(num, True)

instead of:

led = LEDStrip(num)

But you don't really need it at all. Basically, there are two different
methods for accessing the SPI port on the RPi.
a) using the file accessor. As in you just write data to the "file"
/dev/spidev0.0 as you would any other file. This is the default method.
b) using the py-spidev library. this accesses the SPI port directly,
without going through the filesystem layer. Theoretically it's faster, but
in my experience it's not. But I added it as an experimental option.

I will update the readme to hopefully make that more clear.

On Mon, Nov 11, 2013 at 6:27 AM, AxelLanghoff notifications@github.comwrote:

Hello Mr Haile,

I'm trying to follow your instructions to play with the Adafruit LED-Strip
on my Raspberry Pi. Unfortunately I am completely new to Raspbian and
Python and I don't understand one of your installation instructions.
You mention a second parameter of LEDStrip.
("Then set the second parameter of LEDStrip to True to enable py-spidev")
Where is this parameter? I have no idea where to look for it. Could you
please help me out here?

best regards
Axel Langhoff


Reply to this email directly or view it on GitHubhttps://github.com//issues/6
.

Hi Adam,

thanks for the fast reply! My problem was, that I didn't know where to find the line led=LEDStrip(num).
In your instructions you first advise to change this line, and only after that the file with the code is downloaded. I assume the mentioned code is of the file example.py in the RPi-LPD8806 folder?

Unfortunately I still don't see anything on my LEDStrip (http://www.adafruit.com/products/306). It is definitely the newer one with the LDP8806-Chip. As far as I can see I chose the correct pins (SCLK, MOSI), since I tested their voltage with a Voltmeter and the Pi4J-libraries. Only thing that might be wrong is, if I have the LEDStripe connected to my Raspberry, the Voltage on the MOSI-Pin drops from 3.3V to 1.5V. Is that normal, or might that be the problem?

Thanks,
Axel

Yes, it's in example.py

You need to use a level converter (http://www.adafruit.com/products/757) to
get the signals at the right voltage.
Technically it's possible to do so without, but that's what I've always
used and it works fine.

On Mon, Nov 11, 2013 at 9:05 AM, AxelLanghoff notifications@github.comwrote:

Hi Adam,

thanks for the fast reply! My problem was, that I didn't know where to
find the line led=LEDStrip(num).
In your instructions you first advise to change this line, and only after
that the file with the code is downloaded. I assume the mentioned code is
of the file example.py in the RPi-LPD8806 folder?

Unfortunately I still don't see anything on my LEDStrip (
http://www.adafruit.com/products/306). It is definitely the newer one
with the LDP8806-Chip. As far as I can see I chose the correct pins (SCLK,
MOSI), since I tested their voltage with a Voltmeter and the
Pi4J-libraries. Only thing that might be wrong is, if I have the LEDStripe
connected to my Raspberry, the Voltage on the MOSI-Pin drops from 3.3V to
1.5V. Is that normal, or might that be the problem?

Thanks,
Axel


Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-28202012
.

Wow,

lightning fast answers!

Thank you a lot, I'll keep you informed on my experiments :)

No problem. Hope it all works now :)

On Mon, Nov 11, 2013 at 9:17 AM, AxelLanghoff notifications@github.comwrote:

Wow,

lightning fast answers!

Thank you a lot, I'll keep you informed on my experiments :)


Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-28202883
.

Hi Adam,

just wanted to say, that it works now for me. The trouble I had resulted from the first LED-Segment being defect! Searched three days until I found out^^.

Thanks again,
Axel