This guide is focused on AppleTV with Sam.Nazarko image build on Ubuntu 8.04 LTS, but it will also work for other Linux versions.
I did this with standard configuration and Ubuntu installed on internal disk.
I think it will also work with USB pen drive install and USB hub with small modification of boblight.conf (line: output /dev/ttyUSB0) file.
So lets get started. First you will need some hardware. This guide is using the hardware idea from Amblone project. So for building the hardware just go to http://amblone.com/guide On this site there is also schema for building the circuit board.
In this guide i will be using Arduino Mega1280 (http://arduino.cc/en/Main/ArduinoBoardMega) micro-controller with four channels output but it is the same on Arduino Duemilanove (http://www.arduino.cc/en/Main/ArduinoBoardDuemilanove). The only difference is that Duemilanove uses just two channels (one channel means one led stripe and one led stripe one colour). They are both USB type.
Basically you will need:
- 1x Arduino micro-controller (Arduino Mega1280 (4 channels) or. Arduino Duemilanove (2 channels))
(BUY: http://cgi.ebay.de/ws/eBayISAPI.dll?View...fe=sidebar or. http://cgi.ebay.de/Arduino-Duemilanove-2...3a64a21838 )
- 1x RGB LED stripes without lens. I'd recommend this one (5-m) (BUY: http://www.dealextreme.com/p/rgb-multico...-12v-14963
Or. http://www.dealextreme.com/p/rgb-multico...-12v-14965 )
- 1x A USB A to B cable (at some stores on e-Bay you get one with Arduini board as a gift
- 12x 2N 3904 transistors http://www.dz3w.com/uploadfile/2010/0807...813814.gif (BUY: http://cgi.ebay.com/30-x-2N3904-NPN-Gene...3a65d520b2 )
- 12x 2200ohm resistors (BUY: http://cgi.ebay.com/100-x-Resistors-2-2K...3a55380b13 )
- 1x power supply 12v 1A to fit in Arduino and powering RGB LED stripes (BUY: http://www.dealextreme.com/p/ac-to-dc-12...240v-15991 )
- 1x PCB Board (BUY: http://cgi.ebay.com/Paper-Phenolic-Proto...3360240fc5 )
- PIN Headers (BUY: http://cgi.ebay.com/5-X-40-pin-2-54mm-PC...2562e5eeb5 )
- Some wires (BUY: http://cgi.ebay.com/Arduino-Solderless-B...56412e01ab )
Now you have all parts for start building. Use Amblone guide on how to build the board from resistors and transistors. http://amblone.com/guide
First you have to program the micro-controller with the .pde file.
Download .pde for Arduino board from http://code.google.com/p/boblight/source...no_pwm.pde (copy and paste content to notepad and save as f.e. arduino.pde file) (This .pde is suitable for both Arduino Mega1280 and Arduino Duemilanove)
After that download software from http://arduino.cc/en/Main/Software or. direct link http://arduino.googlecode.com/files/arduino-0022.zip
Connect micro-controller to the PC and install drivers (included in software). Then run the program, select com port, Arduino board type and upload the .pde you have downloaded).
If you are having troubles, you can read on Arduino site the how too guide.
Now if you have uploaded the .pde to the controller, you are ready to install Boblight on ATV (Linux).
How to ride on Linux
First i did enable root account on Sams image. Later you can disable it.
Quote:sudo passwd rootThis will prompt for a new root password and once you confirm it, you can start using the root account to login.
If you want to disable root account in Ubuntu you need to lock the root account by using the following command
Quote:sudo passwd -l root
Quote:sudo apt-get install libx11-dev libgl1-mesa-dev libxrender-dev portaudio19-dev libavcodec-dev libavformat-dev libswscale-dev libxext-dev
Download http://packages.ubuntu.com/natty/libavdevice-dev (libav_0.6.2.orig.tar.gz) and upload it with WinSCP into /tmp folder on AppleTV. You can also wget it.
tar -zxvf libav_0.6.2.orig.tar.gz
svn checkout http://boblight.googlecode.com/svn/trunk/ boblight-read-only
Download .conf file from SVN. Conf file for Mega1280 http://code.google.com/p/boblight/source.../mega.conf and for Duemilanove http://code.google.com/p/boblight/source...anove.conf After that, rename it to boblight.conf and copy it into /etc (/etc/boblight.conf) with WinSCP. You can of course direct download it from Ubuntu if you know how to
Now you can start boblight.
sudo boblightd -f
boblight-X11 -f -x
You can experiment then a little with settings.
At the moment i have those
Quote:boblight-X11 -f -x -o speed=70 -o value=10 -o saturation=5.5 -o threshold=100
This are options for boblight-X11:
Quote:Usage: boblight-X11 [OPTION]
-p priority, from 0 to 255, default is 128
-s address:[port], set the address and optional port to connect to
-o add libboblight option, syntax: [light:]option=value
-l list libboblight options
-i set the interval in seconds, default is 0.1
prefix the value with v to wait for a number of vertical blanks instead
-u set the number of pixels/rows to use
default is 64 for xrender and 16 for xgetimage
-x use XGetImage instead of XRender
-d debug mode
-y set the sync mode, default is on, valid options are "on" and "off"
name type min max default
speed float 0.0 100.0 100.0
autospeed float 0 100.0 0.0
interpolation bool 0 1 0
use bool 0 1 0
saturation float 0.0 20.0 1.0
saturationmin float 0.0 1.0 0.0
saturationmax float 0.0 1.0 1.0
value float 0.0 20.0 1.0
valuemin float 0.0 1.0 0.0
valuemax float 0.0 1.0 1.0
threshold int 0 255 0
hscanstart float 0.0 100.0 -1.0
hscanend float 0.0 100.0 -1.0
vscanstart float 0.0 100.0 -1.0
vscanend float 0.0 100.0 -1.0
- If you run
Quote:boblightdwithout switch, it will run in foreground (useful for troubleshooting). With CTRL+c you can cancel foreground deamon)
- First test lights with
Quote: boblight-constant ffshould run blue light. To exit CTRL+c.
- If it says: ([email protected]:/tmp/boblight-read-only# boblight-constant ff ERROR: libboblight.so: cannot open shared object file: No such file or directory [email protected]:/tmp/boblight-read-only#) then (run
Quote:ldconfig[quote] as root)Stops boblight deamon.
- [quote]killall boblightd
Quote:killall boblight-X11Stops boblight-X11 deamon.
Quote:boblight-X11 --helpHelp info for more config options.
- Read this to auto-start "boblightd" http://forum.xbmc.org/showpost.php?p=800...stcount=10
- Advance Launcher with Ambilight: http://forum.xbmc.org/showpost.php?p=851...stcount=36
- To dim the lights select Screensaver as black.
- It makes no affect on CPU if using one or four channels.
- On my AppleTV the processor is:
- around 37% when on idle (on system info screen)
- 47% when playing 1080p movie (Avatar 8GB file) (Using CrystalHD 70012)
- 40% when playing 720p movie (Law Abinding Citizen 4GB file) (Using CrystalHD 70012)
- 30% on standard divx film (Animal United 1,57 - 2cd file)
TNX to bobo1on1 for making this possible and great IRC support.
Feedback and tips are welcome.
Here you can see some pictures of power circuit that I have build. This is just for better ''imagination''.
You have to be careful that you do insert some sort of isolation between the Arduino and power circuit.
Also when soldering use paste to achieve good contacts between the components and solder. And when you are finished done soldering clean the PCB board (i have used Acetone and brush) to avoid conductibility between electronic parts. Also double check that there is no shortcuts between transistors.