Posts by Arakon
-
-
Well, my ambilight is set up (minus final calibration) and works fine.
Power distribution is done via a power splitter board (actually intended for a drone originally), connected via an XT30 plug (can handle 30 amps).
All devices and the strip are powered from that board.
The PSU had to go down on the sideboard since the gap between TV and wall is too small. I'm using an original Raspberry Pi Zero (without wlan), hence the wlan stick on the USB hub.
Certainly not the prettiest wiring job, but it does the trick with what little space I have behind the TV. -
Ok, I managed to hack together a solution.
Code
Display More#!/usr/bin/env python import RPi.GPIO as GPIO import subprocess import time GPIO.setmode(GPIO.BCM) GPIO.setup(3, GPIO.IN, pull_up_down=GPIO.PUD_UP) state = 0 while True: GPIO.wait_for_edge(3, GPIO.FALLING) if (state == 0): subprocess.call(['hyperion-remote', '-c', 'black'], shell=False) state = 1 time.sleep(0.2) elif (state == 1): subprocess.call(['hyperion-remote', '--clearall'], shell=False) state = 0 time.sleep(0.2) GPIO.cleanup()
This goes in /usr/local/bin/ as hyper-switch.py.
sudo chmod +x /usr/local/bin/hyper-switch.pyCode
Display More#! /bin/sh ### BEGIN INIT INFO # Provides: hyper-switch.py # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 ### END INIT INFO # If you want a command to always run, put it here # Carry out specific functions when asked to by the system case "$1" in start) echo "Starting hyper-switch.py - Use pin 5 and GND" /usr/local/bin/hyper-switch.py & ;; stop) echo "Stopping hyper-switch.py" pkill -f /usr/local/bin/hyper-switch.py ;; *) echo "Usage: /etc/init.d/hyper-switch.sh {start|stop}" exit 1 ;; esac exit 0
This goes in /etc/init.d/ as hyper-switch.sh
sudo chmod +x /etc/init.d/hyper-switch.shFinally run
sudo update-rc.d hyper-switch.sh defaultsReboot.
Connect a pushbutton between pin 5 (GPIO3) and GND.
Pressing the button will toggle between setting the LED strip to all black and resuming normal operation.The code and info is mostly bits and pieces I found online and adjusted to fit my needs.. it seems to work fine so far.
-
Thanks, but I'd like to have the functionality without having to have my phone nearby.
-
I can once I am done wiring it up. But there's really nothing special to it.. 5V to Pin 4, GND to Pin 6.
-
I simply wire the 5V/GND on the GPIO to the power supply.
If I wanted to keep the fuse in play, I'd solder a micro USB cable to the 5V of the power supply. -
..fix what?
-
I'm very new to the raspberry and not a coder at all (much better at messing with the hardware than the software).. Do you have an example? I tried digging around some already, but all the tutorials seem to require decent coding knowledge and only give parts of the needed info, not a "from scratch" approach.
-
Ok, thank you.
-
For some reason, I see a lot of tutorials powering the Pi from a seperate power supply. Is there any specific reason for this, instead of just using the 5V high amp PSU that is used to power the LED strip?
-
Hi.
I'm wondering if there's a way to disable the LED strip using a simple pushbutton connected to the GPIO?
I'm waiting for the LED strip currently, going to set up a HDMI-input ambilight with the standard raspberry-grabber-hdmi splitter-hdmi converter combination.
I saw there are plugins for Kodi etc for this, but no standalone options. -
Is the 2A power supply the only one you use? Or do you have an extra PSU for the LED strip? The 2A are way too weak otherwise.