Picture of Make your own TV ambilight using Arduino
This is a very easy project.

Here is the result

I won't go into too much detail how each part works, because I have written some information on my blog.

But you should be able to make it work with the information given on this instructable.

Remove these adsRemove these ads by Signing Up

Step 1: Prepare RGB LED strip

Picture of Prepare RGB LED strip
The RGB LEDs came as a strip, but I want them to be separated further, so I soldered wires in between. I also use hot glue to strengthen the soldering points.

you could buy led strips that have long cables, or you can just use this out of the box, it's up to you.

I am using 25 LEDs.

Step 2: Mount LED strip on TV

Picture of Mount LED strip on TV
My example is a bad one. you should be more accurate about the LED positions. and the should be facing outward with a angle, so the Lights can be seen brighter from the front.

The sketch is how the LEDs should be mounted on the TV. 

Step 3: The Connection (Arduino, Power)

Picture of The Connection (Arduino, Power)
The good thing about these LED strip is, it only requires one data connection from the Arduino.

You have to use external power source. I am using a 5V 2A power adapter for this. 

Note: GND of the power source should be connected to the Arduino GND.

Step 4: Finally the source code

Just copy these source code and you are good to go

I use Processing on the computer

1-40 of 45Next »
TomažN11 days ago

I feel as though the program processing is not working properly. Does anyone have a matter that work? I would ask that we send this file. thank you

TomažN11 days ago

I use a macbook air. I have a problem that processing does not want to run a single LEDs. I always change the port between 0 and 3, and after 10 attempts, the LED lights light up but not always. What would cause this?

TomažN1 month ago


I have one problem. The red color is green and purple is light blue. how to fix this?

Just change this line:

Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LED, PIN, NEO_GRB + NEO_KHZ800);


Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LED, PIN, NEO_RGB + NEO_KHZ800);

Mr.Yourself1 month ago

Hi everybody,

thanks for good idea how to improve home entertainment. Everything works
well (for now only with 8pcs of 2812 for testing) I already ordered
strip with 150 pcs of these LEDs. As I know that to drive every LED
separatelly would take amount of PC capacity, I tried to change Arduino
code to send every incoming byte to 3 neighbouring LEDs. (in the
processing I would use just 50 rectangles) Is anybody able to check what
I have done wrong? I copied here only the part which I changed against original code. (With this program I can not light up more than 50
LEDs. Is the limit the line with “#define NUM_LED 50″ ? When I change it
to 150, Arduino expect bytes for 150 LEDs and receive only 50. Thanks.


for (int i = 0; i < (3 * NUM_LED); i++) {
int led_index = i * 3 + 2;
strip.setPixelColor(i, strip.Color(led_color[led_index], led_color[led_index + 1], led_color[led_index + 2]));
strip.setPixelColor(i, strip.Color(led_color[led_index], led_color[led_index + 1], led_color[led_index + 2]));
strip.setPixelColor(i, strip.Color(led_color[led_index], led_color[led_index + 1], led_color[led_index + 2]));


seb_168 made it!6 months ago

I made it and it works perfectly, thanks you. But i'm thinking about using c# instead of processing for better performances. If someone already test this ..?

jajunkie seb_1684 months ago

i can not figure out what i am doing wrong. i get the processing code to run and it changes colors as needed in the java window. i can also get the arduino code loaded and the ozy reply but i do not get any lights changing. all the leds just turn blue and thats it. i am running the apa104 60 led strip. if anyone can help that would be great.

jajunkie jajunkie4 months ago

when i look at the serial monitor it just says ozy and keeps repeating 'y'.

zootalaws seb_1685 months ago
(removed by author or community request)
seb168 zootalaws5 months ago

Sure :

zootalaws seb1685 months ago

i am lost - it loads without error, if I look at the serial monitor I get 'ozy', but when I launch Processing, it just sits there with a 'blank' screen.

I guess it might be because I am on a Mac.

seb168 zootalaws5 months ago

I had this problem too, check your java version etc..

On windows I used the 32bits version of processing to get it works

zootalaws seb1685 months ago

Brilliant suggestion!

It wasn't Java, but was some java libraries inside Processing. Copied the ones from Arduino to Processing and it worked first time!

Thanks for the code and your hint!

zootalaws seb1685 months ago

OK - that makes sense. I downgraded to Arduino 1.0.6 for another problem which was caused by a timing issue in the compiler.

Thanks Seb, I will investigate further.

zootalaws seb1685 months ago

Great, thanks.

zootalaws seb_1685 months ago
Did you make it using the exact code here, or did you have to rewrite it?
seb168 zootalaws5 months ago

I used the code here, I just change values and 1 or 2 lines

zootalaws seb_1685 months ago

Seb, Do you want to post both bits of code that you used?

I get intermittent results, some times, but have never gotten it to work properly.

mat.tripp4 months ago

Hi i am struggling a little with processing.

how do specify which monitor to measure ?

and how to specify what com port to use?


mat.tripp4 months ago

Hi i am struggling a little with processing.

how do specify which monitor to measure ?

and how to specify what com port to use?


reducingmyconsumption made it!9 months ago

I made this using WS2801 LEDs (pictured below) because they were much cheaper than WS2811/ WS2812, they came pre-wired (but this limits the size of your TV to around 32") and the performance is exactly the same.

The only thing that I would change in your build is the processing software. I used ambibox 2.1.4 instead of processing because it allows greater customisation and has a lot of extra features. It allows multiple profiles for different aspect ratios which is important when watching movies, it can react to sound instead of screen captures for when you're browsing the web (rather that projecting boring website colours onto your wall) plus you can change saturation and brightness which allows you to fine tune it to suit your rooms wall colour and it's much easier to use than processing!

Thanks for posting this, you inspired me to build my amblight build a few moths ago and I absolutely love it.

lacglzh (author)  reducingmyconsumption9 months ago

I didn't know you can get this type of LED, well done on your build! :-D

zootalaws lacglzh6 months ago

You can get 'xmas lights' of 50 WS2811 LEDs for about $12. Saves a lot of soldering!

I am trying to get your apps working without much luck. I'm not much of a programmer, but I can fumble through. I mapped out the LED layout in Excel but am confused about x and y numbers and 0,0.

In your code, you say you have (for 25 LEDs) 10 x 6. but for me, that makes 32 LEDs - 10 across the top, 6 on the sides x 2.

So top left is 0,0, left side is 0 column, is the top left LED counted in both top and left column?

Regardless - I can't get the two halves to fire. I am confident they are exactly as you had in your example, with the port setup for my comm port setup - I can see the oxy in the Arduino serial monitor if I use that, but the LEDs just all stay lit white. It's like it never gets past the basic initialisation.

bogdanbarnea6 months ago
Tanks for your helpful project i realised ambilight whit 120 led and some modifications and is work perfectly tnx again
maewert1 year ago
I think I understand what you are doing. You hook up your TV as a computer monitor and you execute a PROCESSING script running on the computer which monitors the edges of the video image and sends the color data to the Arduino over the serial port. The Arduino receives the color data from your computer and clocks them out to a Neopixel RBG LED strip which you have modified to fit your TV. Cool.
lacglzh (author)  maewert1 year ago
That's right, you are not bad! :-D


GREAT JOB i like it very much, but i have a litle problem with arduino code.

When i copy/paste arduino code to arduino software, he give me this errors:

strip_1m:15: error: Adafruit_NeoPixel does not name a type

strip_1m.ino: In function void setup():

strip_1m:23: error: strip was not declared in this scope

I real like to do this project for myself, i have allready all done , only this probem is left.

Maybe please someone send me Adruino code to mai email please :


Hi tkotnik / lacglzh,

I have the same issue with the Arduino Code. How did you solve this?

email me at

Thanks in advance

PiotrS8 months ago

Jacob_M1 year ago
Hey, its a very good tutorial but I didn't understand few things
which type of LEDs is it? I have a RGB led strip and it looks very different, I have 4 connections, 3 for red,green,blue and one for GND, and you have only 3
Please explain your self better I want to make this.
and How you wire this up? the picture isn't understandable.
Thank you,


he use ws2811 chip led,

it have only 3 connections...

NOW ,APA102 come out ,it is new build in ,but have data ,clock ,GND 5V ,4 connection months ago

it is very great ,i will build my own project ,but use apa102 apa104 led strip to replace the led pixel

h3nkinstruct8 months ago
Ma cosa fa variare il colore e la luminosità del led rgb?
Un sensore luminosità?
bnasty949 months ago

i have a question and someone please help me this project is what made me want an arduino but i have everything i need but what is the aux adapter that goes to the ardiuno can someone please help me

bnasty949 months ago

yes i would really like some help yes i am a noob to the arduino but what is the aux cable with the adapter for i would love to do this project but i need some help please

craftclarity9 months ago

This is super cool! You should enter it in the Home Technology Contest....!!!!

lacglzh (author)  craftclarity9 months ago

thank you, I just did! :-D

lacglzh (author)  lacglzh9 months ago

no, i can't, because they said it's too old...

molovesdiy9 months ago
i think this would make my head hurt!!!
1-40 of 45Next »