
Dans cet article, je vais vous présenter Boblight, c’est un clone d’Ambilight sur Raspberry Pi qui va nous permettre de donner un dimension à nos films et séries grâce à des LED placées sur le derrière de notre télé qui vont suivre les couleurs de notre image et que l’ on peut aussi contrôler manuellement à l’aide d’une application BobDroid disponible ici.
Nous allons installer Raspbmc, qui est une distribution pour Raspberry avec Kodi (Xbmc) pré-installé, on va pourvoir lire nos vidéos directement sur le Raspberry ou comme moi se servir d’un pc comme média center et utiliser le Raspberry que pour Boblight.
Liste du matériel.
- Un Raspberry Pi.
- Des LED (moi j’ai choisi des WS2801 car elles sont compatibles avec Boblight et autre solution du même type, j’ai pris ce modèle
mais d’autres comme ça
iront très bien aussi). - Une alimentation 5v 5 Ampères comme celle-ci.
Branchement du bandeau de LED.
Pour le branchement, nous allons alimenter nos LED et notre Raspberry pi avec notre alimentation donc on relie le 5v de notre alimentation au 5v des gpio du Raspberry et au fil rouge de nos LED, pareil pour le 0v et le fil bleu de nos LED.
On raccorde :
- Le fil bleu au pin 0.
- Le fil blanc au pin 12.
- Le vert au pin 14.
J’ai fixé toutes les LED sur la télé à l’aide d’un pistolet à colle.
Une fois remonté.
Préparation du Raspberry Pi.
Pour commencer, nous allons télécharger et installer Raspbmc, rendez-vous ici pour le télécharger prenez bien la version pour Raspberry.
Ensuite, on crée la carte SD à l’aide de win32Diskimager Tuto ici.
Maintenant on va se connecter en SSH à son Raspberry et on va tapez les commandes suivante :
sudo initctl stop xbmc
Pour arrêter Xbmc.
sudo apt-get update -y
On met à jour le Raspberry.
sudo apt-get install make gcc g++ subversion
On installe les paquets nécessaires.
svn checkout http://boblight.googlecode.com/svn/trunk/ /home/pi/boblight_source
On télécharge le code google de Boblight.
cd /home/pi/boblight_source/ ./configure --without-portaudio --without-x11 --without-libusb
On vérifie si les sources sont prête à être compilé.
make;sudo make install
On compile (peu prendre jusqu’à 30 minutes).
Configuration de Boblight.
Maintenant, il faut configurer Boblight en fonction du nombre de LED, pour mes 50 LED le boblight.conf contiendra :
#[global] interface 127.0.0.1 port 19333
[device] name Pibob type ws2801 channels 150 output /dev/spidev0.0 interval 20000 rate 48000
[color] name red rgb FF0000 gamma 1.0 adjust 1.0 blacklevel 0.0
[color] name grn rgb 00FF00 gamma 1.0 adjust 1.0 blacklevel 0.0
[color] name blu rgb 0000FF gamma 1.0 adjust 1.0 blacklevel 0.0
[light] name L01 color red Pibob 1 color grn Pibob 2 color blu Pibob 3 hscan 0 10 vscan 92 100
[light] name L02 color red Pibob 4 color grn Pibob 5 color blu Pibob 6 hscan 0 10 vscan 85 92
[light] name L03 color red Pibob 7 color grn Pibob 8 color blu Pibob 9 hscan 0 10 vscan 78 85
[light] name L04 color red Pibob 10 color grn Pibob 11 color blu Pibob 12 hscan 0 10 vscan 71 78
[light] name L05 color red Pibob 13 color grn Pibob 14 color blu Pibob 15 hscan 0 10 vscan 64 71
[light] name L06 color red Pibob 16 color grn Pibob 17 color blu Pibob 18 hscan 0 10 vscan 57 64
[light] name L07 color red Pibob 19 color grn Pibob 20 color blu Pibob 21 hscan 0 10 vscan 50 57
[light] name L08 color red Pibob 22 color grn Pibob 23 color blu Pibob 24 hscan 0 10 vscan 42 50
[light] name L09 color red Pibob 25 color grn Pibob 26 color blu Pibob 27 hscan 0 10 vscan 35 42
[light] name L10 color red Pibob 28 color grn Pibob 29 color blu Pibob 30 hscan 0 10 vscan 28 35
[light] name L11 color red Pibob 31 color grn Pibob 32 color blu Pibob 33 hscan 0 10 vscan 21 28
[light] name L12 color red Pibob 34 color grn Pibob 35 color blu Pibob 36 hscan 0 10 vscan 14 21
[light] name L13 color red Pibob 37 color grn Pibob 38 color blu Pibob 39 hscan 0 10 vscan 7 14
[light] name L14 color red Pibob 40 color grn Pibob 41 color blu Pibob 42 hscan 0 10 vscan 0 7
[light] name T01 color red Pibob 43 color grn Pibob 44 color blu Pibob 45 hscan 4 8 vscan 0 20
[light] name T02 color red Pibob 46 color grn Pibob 47 color blu Pibob 48 hscan 8 12 vscan 0 20
[light] name T03 color red Pibob 49 color grn Pibob 50 color blu Pibob 51 hscan 12 16 vscan 0 20
[light] name T04 color red Pibob 52 color grn Pibob 53 color blu Pibob 54 hscan 16 20 vscan 0 20
[light] name T05 color red Pibob 55 color grn Pibob 56 color blu Pibob 57 hscan 20 25 vscan 0 20
[light] name T06 color red Pibob 58 color grn Pibob 59 color blu Pibob 60 hscan 25 29 vscan 0 20
[light] name T07 color red Pibob 61 color grn Pibob 62 color blu Pibob 63 hscan 29 33 vscan 0 20
[light] name T08 color red Pibob 64 color grn Pibob 65 color blu Pibob 66 hscan 33 37 vscan 0 20
[light] name T09 color red Pibob 67 color grn Pibob 68 color blu Pibob 69 hscan 37 41 vscan 0 20
[light] name T10 color red Pibob 70 color grn Pibob 71 color blu Pibob 72 hscan 41 45 vscan 0 20
[light] name T11 color red Pibob 73 color grn Pibob 74 color blu Pibob 75 hscan 45 50 vscan 0 20
[light] name T12 color red Pibob 76 color grn Pibob 77 color blu Pibob 78 hscan 50 54 vscan 0 20
[light] name T13 color red Pibob 79 color grn Pibob 80 color blu Pibob 81 hscan 54 58 vscan 0 20
[light] name T14 color red Pibob 82 color grn Pibob 83 color blu Pibob 84 hscan 58 62 vscan 0 20
[light] name T15 color red Pibob 85 color grn Pibob 86 color blu Pibob 87 hscan 62 66 vscan 0 20
[light] name T16 color red Pibob 88 color grn Pibob 89 color blu Pibob 90 hscan 66 70 vscan 0 20
[light] name T17 color red Pibob 91 color grn Pibob 92 color blu Pibob 93 hscan 70 75 vscan 0 20
[light] name T18 color red Pibob 94 color grn Pibob 95 color blu Pibob 96 hscan 75 79 vscan 0 20
[light] name T19 color red Pibob 97 color grn Pibob 98 color blu Pibob 99 hscan 79 83 vscan 0 20
[light] name T20 color red Pibob 100 color grn Pibob 101 color blu Pibob 102 hscan 83 87 vscan 0 20
[light] name T21 color red Pibob 103 color grn Pibob 104 color blu Pibob 105 hscan 87 91 vscan 0 20
[light] name T22 color red Pibob 106 color grn Pibob 107 color blu Pibob 108 hscan 91 95 vscan 0 20
[light] name T23 color red Pibob 109 color grn Pibob 110 color blu Pibob 111 hscan 95 100 vscan 0 20
[light] name R01 color red Pibob 112 color grn Pibob 113 color blu Pibob 114 hscan 90 100 vscan 7 14
[light] name R02 color red Pibob 115 color grn Pibob 116 color blu Pibob 117 hscan 90 100 vscan 14 21
[light] name R03 color red Pibob 118 color grn Pibob 119 color blu Pibob 120 hscan 90 100 vscan 21 28
[light] name R04 color red Pibob 121 color grn Pibob 122 color blu Pibob 123 hscan 90 100 vscan 28 35
[light] name R05 color red Pibob 124 color grn Pibob 125 color blu Pibob 126 hscan 90 100 vscan 35 42
[light] name R06 color red Pibob 127 color grn Pibob 128 color blu Pibob 129 hscan 90 100 vscan 42 50
[light] name R07 color red Pibob 130 color grn Pibob 131 color blu Pibob 132 hscan 90 100 vscan 50 57
[light] name R08 color red Pibob 133 color grn Pibob 134 color blu Pibob 135 hscan 90 100 vscan 57 64
[light] name R09 color red Pibob 136 color grn Pibob 137 color blu Pibob 138 hscan 90 100 vscan 64 71
[light] name R10 color red Pibob 139 color grn Pibob 140 color blu Pibob 141 hscan 90 100 vscan 71 78
[light] name R11 color red Pibob 142 color grn Pibob 143 color blu Pibob 144 hscan 90 100 vscan 78 85
[light] name R12 color red Pibob 145 color grn Pibob 146 color blu Pibob 147 hscan 90 100 vscan 85 92
[light] name R13 color red Pibob 148 color grn Pibob 149 color blu Pibob 150 hscan 90 100 vscan 92 100
Il faut le copier dans /etc/boblight.conf
sudo nano /etc/boblight.conf
Ctrl-x pour sauvegarder.
sudo boblightd -f > /dev/null
Pour lancer le daemon.
sudo boblight-constant ff0000
toutes les LED devraient s’allumer en rouge.
sudo nano /etc/rc.local
Pour que Boblight se lance au démarrage ajoutez :
/usr/local/bin/boblightd -f
Avant le exit 0, et sauvegarder avec Ctrl-x.
Voilà, redémarrez le Raspberry.
sudo reboot
Installez l’application Android et indiquez lui l’ip du Raspberry.
Votre Boblight est prêt, vous pouvez tester les animations de l’application.
Maintenant, nous allons installer le plugin pour Xbmc, il se nomme XBMC Boblight, on va lui indiquez l’adresse ip du Raspberry si vous utilisez un autre média center sinon marquez 127.0.0.1.
Maintenant, si vous lancer un film Boblight doit allumer les LED en fonction de l’image, pensez à couper le contrôle manuel depuis l’application pour xbmc prenne le contrôle.
Voila tout est prêt plus qu’à vous souhaitez un bon film ^^.
J’espère que cet article vous aura plu, n’hésitez pas à poser vos questions dans les commentaires.
bonjour tout t’abord sympa ton blog
j’aurais une petite question pour les 50 leds c’est pour un ecran de quel taille ?
Salut merci, c’est un 107 cm l’écran.
tu serais combien il en faudrait pour un écran de 140cm ?
Sa dépend des led que tu utilise si c’est les même que les mienne je crois quelle existe par 100 ou tu prend 2 fois 50 tu peut les raccorder.
Article fort sympathique, une lecture agréable. Ce blog est vraiment pas mal, et les sujets présents plutôt bons dans l’ensemble, bravo ! Virginie Brossard LETUDIANT.FR
Article fort sympathique, une lecture agréable. Ce blog est vraiment pas mal, et les sujets présents plutôt bons dans l’ensemble, bravo ! Virginie Brossard LETUDIANT.FR
bonjour,j’aimerai utiliser ce système mais pour une longueur de 30m.peut t on coupler les longueurs de leds entre elle.