gkaindl / ambi-tv

a flexible ambilight clone for embedded linux
296 stars 85 forks source link

Possible SPI Problem #19

Closed Mrjohns42 closed 10 years ago

Mrjohns42 commented 10 years ago

I followed the setup as described by @sn00zerman in another issue thread (https://github.com/gkaindl/ambi-tv/issues/7#issuecomment-23190594). Everything built and ran correctly, but with no output on the LED strip, even in moodlight mode. I'm thinking there may be a SPI issue.

I downloaded and ran spidev_test.c (http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/spi/spidev_test.c) on spidev0.0, and it failed. The output it produced was as all 0xFF's.

Any ideas?

evilsperm commented 10 years ago

I am having the same exact issue :( 52 led strips, everything is compiled without issue. But I notice I have to run modprobe spi_bcm2708 every time I restart the pi to get spi up and running... After everything checks out I run ambi-tv and all leds are white, with the very first one blinking rapidly though all the colors, even putting it in moodlight mode I get random blinks of random colors super fast for about 9 leds or so but nothing else... Anyone shedding some light on this would be nice.

gkaindl commented 10 years ago

You can add the spi_bcm2708 module to /etc/modules to insert it automatically at boot time.

Regarding the funky LED issue, I'd suggest making sure that the image you are actually getting from your HDMI/AV adapter is ok (check with mplayer while your Pi is connected to a screen), and that if you are using separate power supplies for your Pi and LEDs, that the two supplies' GND pins are shorted together.

YoBnEb commented 10 years ago

@evilsperm

You can also comment it our in raspberry's blacklist.

You only have to edit /etc/modprobe.d/raspi-blacklist.conf

blacklist spi-bcm2708

Then you don't have to modprobe it after every reboot.

evilsperm commented 10 years ago

Awesome guys thanks! I am up and running for the most part ;)

I edited /etc/modprobe.d/raspi-blacklist.conf

blacklist spi-bcm2708

Thanks YoBenEb

And for my testing I was using 2 different power supplies so I jumped a GND to the led strip from the GPIO and rebooted the pi and tested mood light and it is working now, I still have to test video for edge color but if mood light is working I'm sure I can get it running. Thanks gkaindl for your help ;)

Mrjohns42 commented 10 years ago

I'm still having an issue. The spi_bcm2708 module is there. I'm using the 32 LED/m string from Adafruit. The lights and the Pi have a common ground. When I power on the pi, a couple LEDs come on at randomly different spots (2 blue, 2 green, 3 white). Ambi-tv and the misc setup compiles perfectly as per @sn00zerman 's steps, but absolutely no change on the LED strip when ambi-tv is run, in any mode.

Mrjohns42 commented 10 years ago

Funny story. I've been using an Adafruit Pi Cobbler (T-shape) to break out the GPIO into a breadboard. Turns out the ribbon cable they supplied for it is backwards from what it says it's supposed to be.

Flipped it around and the SPI seems to be working now.

Still, I'm only getting output on moodlight mode, which means something is wrong with the video capture.

evilsperm commented 10 years ago

Mrjohns42:

you are now in the same situation I am in, I can put $ on it you got the wrong converter... I wasn't paying attention when I ordered mine and I have the av2hdmi not hdmi2av. I will make a post on issues to see if someone can help by dumping their FW on their hdmi2av for us and hopefully it will be as easy as re-flashing the device with the hdmi2av dump. I dont think they made 2 hardware iterations...

Mrjohns42 commented 10 years ago

Actually I'm not using a converter currently. You see, my video source is coming from an AT&T cable box. The box has multiple video output formats. So I ran an HDMI cable from the box to the TV, and an SVideo cable from the box to the EasyCap.

However, I don't seem to be getting any signal on the EasyCap this way. I'm guessing (hoping) that the issue is that my cable box won't put out two video formats in parallel. So I just purchased this splitter and this converter (it was recommended in another thread).