hardware:ambilight
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| hardware:ambilight [2019/08/28 20:57] – [Software] excyle | hardware:ambilight [2024/02/22 20:35] (current) – [Software] excyle | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Ambilight clone ====== | ====== Ambilight clone ====== | ||
| + | |||
| Onder XBMC is het erg makkelijk om met een arduno en een digitale RGD ledstring een ambilight clone te maken, met heel aardig resultaat. | Onder XBMC is het erg makkelijk om met een arduno en een digitale RGD ledstring een ambilight clone te maken, met heel aardig resultaat. | ||
| - | {{: | + | {{: |
| ===== Onderdelen lijst ===== | ===== Onderdelen lijst ===== | ||
| + | |||
| * Arduino Uno | * Arduino Uno | ||
| * RGB ledstring | * RGB ledstring | ||
| Line 11: | Line 13: | ||
| ===== Hardware ===== | ===== Hardware ===== | ||
| - | Wat betreft de hardware is het vrij simpel | + | |
| - | vanaf de ledstring gaat de | + | Wat betreft de hardware is het vrij simpel vanaf de ledstring gaat de |
| * gnd naar de gnd van de arduino en de gnd van de adapter | * gnd naar de gnd van de arduino en de gnd van de adapter | ||
| * +5 naar de +5 van de adapter | * +5 naar de +5 van de adapter | ||
| Line 21: | Line 24: | ||
| ter referentie hier ook de code zelf | ter referentie hier ook de code zelf | ||
| + | |||
| <code c LEDstream.pde> | <code c LEDstream.pde> | ||
| // Arduino " | // Arduino " | ||
| Line 197: | Line 201: | ||
| if(chk == (hi ^ lo ^ 0x55)) { | if(chk == (hi ^ lo ^ 0x55)) { | ||
| // Checksum looks valid. | // Checksum looks valid. | ||
| - | // (# LEDs is always > 0) and multiply by 3 for R,G,B. | + | // (# LEDs is always> 0) and multiply by 3 for R,G,B. |
| bytesRemaining = 3L * (256L * (long)hi + (long)lo + 1L); | bytesRemaining = 3L * (256L * (long)hi + (long)lo + 1L); | ||
| bytesBuffered -= 3; | bytesBuffered -= 3; | ||
| Line 240: | Line 244: | ||
| hold = 100 + (32 - bytesBuffered) * 10; | hold = 100 + (32 - bytesBuffered) * 10; | ||
| mode = MODE_HOLD; | mode = MODE_HOLD; | ||
| - | } | + | |
| } else { | } else { | ||
| // End of data -- issue latch: | // End of data -- issue latch: | ||
| Line 256: | Line 260: | ||
| // Not used. See note in setup() function. | // Not used. See note in setup() function. | ||
| } | } | ||
| - | </ | ||
| + | </ | ||
| ===== Software ===== | ===== Software ===== | ||
| packages uit de standaard ubuntu repo installeren | packages uit de standaard ubuntu repo installeren | ||
| - | |||
| - | Ubuntu 10.04 | ||
| <code bash> | <code bash> | ||
| - | aptitude install | + | aptitude install |
| - | </ | + | |
| - | Ubuntu 12.04 | ||
| - | |||
| - | <code bash> | ||
| - | aptitude install libusb-1.0-0-dev libx11-dev libxrender-dev libxext-dev | ||
| </ | </ | ||
| Line 279: | Line 276: | ||
| <code bash> | <code bash> | ||
| wget https:// | wget https:// | ||
| + | |||
| + | unzip source-archive.zip | ||
| #compilen | #compilen | ||
| cd boblight | cd boblight | ||
| + | cd trunk | ||
| ./configure --without-portaudio --without-opengl --without-x11 --prefix=/ | ./configure --without-portaudio --without-opengl --without-x11 --prefix=/ | ||
| make | make | ||
| make install | make install | ||
| - | </ | ||
| + | </ | ||
| ===== configuratie ===== | ===== configuratie ===== | ||
| - | vervolgens moet je een boblight config maken, het LED gedeelte kan je automagisch via [[http:// | + | |
| + | vervolgens moet je een boblight config maken, het LED gedeelte kan je automagisch via [[http:// | ||
| Je krijgt dan het " | Je krijgt dan het " | ||
| - | {{: | + | {{: |
| (voor 50 leds is deze config bruikbaar) | (voor 50 leds is deze config bruikbaar) | ||
| + | |||
| <code bash> | <code bash> | ||
| mcedit / | mcedit / | ||
| + | |||
| </ | </ | ||
| + | |||
| zet hier de volgende code in : | zet hier de volgende code in : | ||
| + | |||
| <code xorg_conf boblight.conf> | <code xorg_conf boblight.conf> | ||
| #config file for adalight from http:// | #config file for adalight from http:// | ||
| Line 309: | Line 314: | ||
| [device] | [device] | ||
| - | name ambilight | + | name ambilight |
| - | type momo | + | type momo |
| - | output / | + | output |
| - | channels 150 | + | channels |
| - | prefix 41 64 61 00 31 64 | + | prefix |
| - | interval 10000 | + | interval |
| - | rate 115200 | + | rate 115200 |
| - | debug off #turn this on to see what it's doing with the serial port | + | debug off #turn this on to see what it's doing with the serial port |
| - | delayafteropen 1000000 | + | delayafteropen |
| [color] | [color] | ||
| Line 331: | Line 335: | ||
| name blue | name blue | ||
| rgb | rgb | ||
| - | |||
| [light] | [light] | ||
| Line 732: | Line 735: | ||
| hscan 58.82 64.71 | hscan 58.82 64.71 | ||
| vscan 90.91 100 | vscan 90.91 100 | ||
| + | |||
| </ | </ | ||
| Met de prefix bepaal je ook hoeveel leds je aanstuurd, gebruik dus altijd de juiste | Met de prefix bepaal je ook hoeveel leds je aanstuurd, gebruik dus altijd de juiste | ||
| < | < | ||
| + | |||
| Prefix for 25 LEDS: 41 64 61 00 18 4D | Prefix for 25 LEDS: 41 64 61 00 18 4D | ||
| Prefix for 50 LEDS: 41 64 61 00 31 64 | Prefix for 50 LEDS: 41 64 61 00 31 64 | ||
| Prefix for 100 LEDS: 41 64 61 00 63 36 | Prefix for 100 LEDS: 41 64 61 00 63 36 | ||
| + | |||
| </ | </ | ||
| ===== Autostart ===== | ===== Autostart ===== | ||
| + | |||
| uiteraard willen we het geheel automagisch starten. | uiteraard willen we het geheel automagisch starten. | ||
| <code bash> | <code bash> | ||
| - | mcedit /etc/init.d/boblight | + | mcedit /usr/lib/ |
| </ | </ | ||
| + | |||
| zet hier het volgende in | zet hier het volgende in | ||
| - | <code xorg_conf boblight> | ||
| - | #!/bin/sh -e | ||
| - | ### BEGIN INIT INFO | ||
| - | # Provides: | ||
| - | # Required-Start: | ||
| - | # Required-Stop: | ||
| - | # Default-Start: | ||
| - | # Default-Stop: | ||
| - | # Short-Description: | ||
| - | ### END INIT INFO | ||
| - | . / | + | <code xorg_conf boblight.service> |
| + | [Unit] | ||
| + | Description=Boblight Ambient Lighting Daemon | ||
| + | DefaultDependencies=no | ||
| + | After=network.target | ||
| + | [Service] | ||
| + | ExecStart=/ | ||
| + | Restart=on-abort | ||
| - | start_daemon() | + | [Install] |
| - | { | + | WantedBy=multi-user.target |
| - | / | + | |
| - | } | + | |
| - | + | ||
| - | stop_daemon() | + | |
| - | { | + | |
| - | killall boblightd | + | |
| - | } | + | |
| - | |||
| - | case " | ||
| - | start) | ||
| - | log_daemon_msg " | ||
| - | start_daemon | ||
| - | log_end_msg 0 | ||
| - | ;; | ||
| - | stop) | ||
| - | log_daemon_msg " | ||
| - | stop_daemon | ||
| - | log_end_msg 0 | ||
| - | ;; | ||
| - | restart|force-reload) | ||
| - | log_daemon_msg " | ||
| - | stop_daemon | ||
| - | start_daemon | ||
| - | log_end_msg 0 | ||
| - | ;; | ||
| - | *) | ||
| - | echo " | ||
| - | exit 2 | ||
| - | ;; | ||
| - | esac | ||
| - | |||
| - | exit 0 | ||
| </ | </ | ||
| en laat deze automagisch starten | en laat deze automagisch starten | ||
| + | |||
| <code bash> | <code bash> | ||
| - | chmod +x / | + | systemctl daemon-reload |
| - | update-rc.d boblight | + | systemctl enable |
| </ | </ | ||
| ===== Sources ===== | ===== Sources ===== | ||
| + | |||
| [[http:// | [[http:// | ||
| Line 811: | Line 788: | ||
| [[http:// | [[http:// | ||
| + | |||
| + | |||
hardware/ambilight.1567018661.txt.gz · Last modified: by excyle
