HardwarePi install

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  ANT_THOMAS  
 To:  graphitone      
42216.10 In reply to 42216.7 
Definitely interested to see how it all turns out.
I've played with Pis for audio stuff and bought a few DACs and even started making a breakout board for some switches, IR etc.
But had a few too many issues with volumio (I was going headless).

Eventually scraped the idea and went to Chromecast Audios where I want streamed audio.
Stuck them in the bathroom, kitchen, living room, bedroom.

Main use is in the kitchen and occasionally bathroom.
0/0
 Reply   Quote More 

 From:  graphitone   
 To:  ANT_THOMAS     
42216.11 In reply to 42216.10 
I'll keep the thread updated.

I'll have a go with PB suggestions tonight for the backlight on the screen.

I'm trying to make it as easy to use as possible, so the rest of the family only have to press a power button and then they've got control over the whole thing. To that end, I'll need a volume control as well, so I've been reading this about putting a potentiometer in as a volume knob. It's written for Volumio, but providing I can get the stuff they suggest into Libreelec it should be ok.

In my mind the screen'll be mounted flush (or as flush as can be) in the wall, all wiring hidden away but the power taken to a switched mains socket in a cupboard underneath the worktop. I'll have to find a way to make it easily removable, for upgrades and what not.
0/0
 Reply   Quote More 

 From:  graphitone   
 To:  ALL
42216.12 
I did a wrong. :C

Somehow I've lost all sound. Instead of arseing about trying to put the config right, I'm going to wipe the SD card and start again and put what I know works in, make a backup (!) and then troubleshoot it.
0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  graphitone      
42216.13 In reply to 42216.12 
Do you know how to make a backup image of an SD?

Very useful to have at least a basic configured image to go back to if you do a wrong.
0/0
 Reply   Quote More 

 From:  CHYRON (DSMITHHFX)  
 To:  ANT_THOMAS     
42216.14 In reply to 42216.13 
I did exactly that to quickly recover from a botched xfce install using fsarchiver. Dunno if that works on an sd card, I've never backed one up.
“if people in poverty are more susceptible to doing drugs then giving more money to them will give more money to drug dealers who buy guns.”
0/0
 Reply   Quote More 

 From:  graphitone   
 To:  ANT_THOMAS     
42216.15 In reply to 42216.13 
Aye, I'm gonna get a base setup and make an image - don't really know why I didn't do it the first time round. :C
0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  CHYRON (DSMITHHFX)     
42216.16 In reply to 42216.14 
The method I use is a bit crude but works surprisingly well.
I use "dd" to clone the SD card location (something like /dev/mmblock0) to a network location.

Works on a running system which is nice. You can even run the command through gzip to compress the free space and shrink the storage required for the image. Slows the process down though. Requires a same or larger size SD to restore.
0/0
 Reply   Quote More 

 From:  CHYRON (DSMITHHFX)  
 To:  ANT_THOMAS     
42216.17 In reply to 42216.16 
Ah. I was going to suggest the "dd" method but didn't know if it worked on sd cards.
“Just to remind you, we’re still waiting for Donald Trump to tweet.”
0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  CHYRON (DSMITHHFX)     
42216.18 In reply to 42216.17 
The good old fear of getting if and of the wrong way round
0/0
 Reply   Quote More 

 From:  CHYRON (DSMITHHFX)  
 To:  ANT_THOMAS     
42216.19 In reply to 42216.18 
 :-&
“Just to remind you, we’re still waiting for Donald Trump to tweet.”
0/0
 Reply   Quote More 

 From:  Chris (CHRISSS)  
 To:  ALL
42216.20 
Sounds like a really good project. I look forward to seeing the results of it all.

Me
0/0
 Reply   Quote More 

 From:  CHYRON (DSMITHHFX)  
 To:  Chris (CHRISSS)     
42216.21 In reply to 42216.20 
Here's a preview:

“Just to remind you, we’re still waiting for Donald Trump to tweet.”
+1/1
 Reply   Quote More 

 From:  graphitone   
 To:  CHYRON (DSMITHHFX)     
42216.22 In reply to 42216.21 
(fail)
0/0
 Reply   Quote More 

 From:  graphitone   
 To:  All     
42216.23 In reply to 42216.22 
Ok, this portion of the script works really well, (thank you PB!)
 
Code: 
GPIO.setup(5, GPIO.IN, pull_up_down = GPIO.PUD_UP)


oldButtonState1 = True


while True:

    #grab the current button state
    buttonState1 = GPIO.input(5)


    # check to see if button has been pushed

    if buttonState1 != oldButtonState1 and buttonState1 == False:

        subprocess.call("echo 1 > /sys/class/backlight/rpi_backlight/bl_power && shutdown -h now", shell=True,

            stdout=subprocess.PIPE, stderr=subprocess.PIPE)

        oldButtonState1 = buttonState1



        time.sleep(.1)

On a click of the button it turns off the backlight and shuts the Pi down. I only need that one line as it automatically turns the backlight back on on a power up. However, although it was working initially on a rebuild, the sound's dropped off again. :C
0/0
 Reply   Quote More 

 From:  CHYRON (DSMITHHFX)  
 To:  graphitone      
42216.24 In reply to 42216.22 
No? How about this:

“Just to remind you, we’re still waiting for Donald Trump to tweet.”
0/0
 Reply   Quote More 

 From:  graphitone   
 To:  CHYRON (DSMITHHFX)     
42216.25 In reply to 42216.24 
What you doing taking pictures of Throb's living room?
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  graphitone      
42216.26 In reply to 42216.12 
"Somehow I've lost all sound"

My sound broke in Arch by doing something that buggered around with PulseAudio, which then fucked up ALSA, because PulseAudio is a buggy bloated piece of shit that nobody actually needs.

So maybe you installed/upgraded (possibly automatically) something that did fiddled with PA?

0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  graphitone      
42216.27 In reply to 42216.23 
You're still using the "Are we there yet? Are we there yet? ..." method instead of the "Tell me when we're there" one.

If you do really want to do it this way, since you only care about shutdown, you don't need to store/check oldButtonState and can simplify it to:

GPIO.setup(5, GPIO.IN, pull_up_down = GPIO.PUD_UP)

# endless loop until button is pressed
while GPIO.input(5):
	time.sleep(.1)

# verify button state before switching off
if not GPIO.input(5):
	subprocess.call("echo 1 > /sys/class/backlight/rpi_backlight/bl_power && shutdown -h now",
		shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE)

The if verification is probably not necessary (depending on how Python works), but even so it acts as both a safety against unwanted shutdown (incase something goes wrong), and clarifies the intent slightly. (The event-driven/callback method would make it even clearer.)

0/0
 Reply   Quote More 

 From:  Chris (CHRISSS)  
 To:  CHYRON (DSMITHHFX)     
42216.28 In reply to 42216.21 
:D

Me
0/0
 Reply   Quote More 

 From:  CHYRON (DSMITHHFX)  
 To:  graphitone      
42216.29 In reply to 42216.25 
Has he really got a 70s stereo system?
“Just to remind you, we’re still waiting for Donald Trump to tweet.”
0/0
 Reply   Quote More 

Reply to All  
 

1–20  21–40  …  81–92

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2025 Project Beehive Forum

Forum Stats