gkaindl / ambi-tv

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

what is the best to send led array from ambi-tv to arduino #57

Open yakirmalka opened 10 years ago

yakirmalka commented 10 years ago

hello, i am new at linux (few weeks). i would like to send the capturing RGB (easycap and ambi-tv) to my arduino. build some array and send it via serial.

  1. it will be fast enough for ambi light? 2.some one did try this kind of setup?
Phil1988 commented 10 years ago

I dont understand why you open this as you already posted here: https://github.com/tvdzwan/hyperion/issues/6#issuecomment-33314426 read this carefully.

Mrjohns42 commented 10 years ago

An idea. To reduce the data being transferred over serial, only send the values for LED's that change.

Phil1988 commented 10 years ago

I dont think this makes sence because to "detect" which values change needs more time then sending the whole data to the leds. Plus: most of the time every value is changing even if it is a little bit.

Note that the USB grabber on ambi-tv has a different chipset then the one you need for hyperion (ambi-tv it is fushicai seen as 1b71:3002 on lsusb and on hyperion you need a STK 1160).

I had this setup and it worked perfectly from the speed. Only problem are the bad colors at ambi-tv that my LEDs put out. Thats why I switch to hyperion which is not running at the moment for my setup.

Mrjohns42 commented 10 years ago

Are you certain? I would guess that checking an array is faster than transmitting a value via serial.

The actual benefit would of course be a factor of how many lights change on average from frame to frame.

Phil1988 commented 10 years ago

Why should I write it if I am not certain? I connected it with a baud rate of 38400 for 100 LEDs - higher value is no problem (checked also 115200). On testing with standalone arduino a 38400 baudrate can support 25Hz of changing rate. so yes: I'm certain.

Mrjohns42 commented 10 years ago

We're talking about 1 memory access vs. however many instructions the driver uses to drive the serial line.