General Raspberry Pi stuff

Subjects that don't have their own home
Post Reply
Neal
Needs to get out more
Posts: 1943
Joined: Fri Aug 03, 2007 10:57 am
Location: From the land of the Bodgers

General Raspberry Pi stuff

Post by Neal » Wed Jan 24, 2018 2:23 pm

Welcome to the all encompassing Raspberry Pi thread. A collection of random stuff about the RPi.

Raspberry Pi's are great little things and as a few of us here are putting them to good use I thought it might be a good idea to share ideas and tips on how to use them, mainly so I can learn more from Jack(Nick)/Nick etc. And maybe encouraging others to find a use for them too.

One obvious use is as a music/multimedia player using a TopHat addon board IE:DAC etc to stream audio and video. There seems to be quite a few s/w choices available like volumeIO, Runeaudio, picoreplayer, max2play, mopidy, Moode etc.

I use max2play, it works as a squeezebox and can run LMS if required along with Kodi(XBMC) plus other neat stuff. I run a I2S feed from the RPi to my Arcam TDA1541a DAC board, upsampling it along the way, works a treat.

I have one as a DNS and DHCP server at home running pihole mainly because I no longer wanted to use BT's DNS servers and I wanted to block various tracking services...but BT wouldn't let me change (they have since introduced an opt out setting in my on-line account profile) putting a warning on screen about how they don't allow alternative DNS servers like Google or OpenDNS.

I have another being used as a simple 2x IP camera CCTV system with external USB storage using zoneminder as the controlling s/w. This one is an RPi2 as well and copes OK with 2 cameras at 10~12 fps any more though and it collapses. The RPi3 maybe better but I would limit the connections to 2 cameras anyhow.

More recently I've been using the latest RPi3B as a low powered desktop which is working out OK within limits.

As a desktop the RPi3B is way better than the previous 2B but it does fall short in a number of areas. It is still limited to 1GB of mem and you have to give some of that up to the GPU for the desktop plus it lacks a proper on/off switch, although there is a neat solution around that. Also, I'm not sure of the durability of SD cards in a desktop environment and maybe a USB SSD or mSATA drive would be better for longevity, there are mSATA tophat adapters available from Element14 I believe....
Only the Sith deal in absolutes.

Neal
Needs to get out more
Posts: 1943
Joined: Fri Aug 03, 2007 10:57 am
Location: From the land of the Bodgers

Re: General Raspberry Pi stuff

Post by Neal » Wed Jan 24, 2018 2:25 pm

On/off sitches.
You can shut the RPi down from the desktop but there is no way to do a controlled shutdown via hardware as standard. Power on is ok if you use a physical switch in the PSU lead but it should never be used to power off as the SD card may get corrupted.

There seems to be a number of DIY and addon options available that allow for a controlled shutdown which is fine but I found a neat DIY solution that uses some simple python code and a pair of miniture NormallyOpen momentary switches.

Essentially all the info is here: https://github.com/TonyLHansen/raspberr ... ff-switch/

Im just using the press and hold scipt set to 4 seconds, it works a treat. The instructions to modify rc.local are a bit thin but all you do is enter the call to the script before the 'exit 0' IE: in mine it is 'python /home/pi/shutdown-with-hold.py &'

To boot the RPI if power is already attached I installed another switch in the unpopulated 'run' pads near the top hat header pins 39 and 40, as shown in the link. I think this is really a reset switch so it should not be used if the RPi is already up and running.....maybe use it only if your RPi locks up for some reason!

Anyhow, enjoy.
Only the Sith deal in absolutes.

User avatar
Nick
Site Admin
Posts: 12388
Joined: Sun May 06, 2007 10:20 am
Location: West Yorkshire

Re: General Raspberry Pi stuff

Post by Nick » Wed Jan 24, 2018 5:06 pm

This looks like a non free solution to shutdown.

https://www.rapidonline.com/pimoroni-pi ... roni%20CON
Resistance isn't futile it's V / I.

User avatar
Ray P
Social outcast
Posts: 3808
Joined: Thu Nov 22, 2007 5:18 pm
Location: Somerset

Re: General Raspberry Pi stuff

Post by Ray P » Wed Jan 24, 2018 6:30 pm

There are some interesting RPi DAC and associated hardware boards around at allo, like the Kali Reclocker;

https://www.allo.com/sparky/kali-reclocker.html

check out the other products on the website too.

They're currently working on a new DAC based on the recently introduced ESS9028/38 DAC chip family.

Neal
Needs to get out more
Posts: 1943
Joined: Fri Aug 03, 2007 10:57 am
Location: From the land of the Bodgers

Re: General Raspberry Pi stuff

Post by Neal » Thu Jan 25, 2018 1:30 pm

Cheers Nick, good price really.

Cases.
Tons available, the new RPi3 one is neat but no room for a tophat and no ventilation which is a consideration if you want to overclock.

Whilst on overclocking the RPi3 can now only be overclocked by modifying /boot/config.txt. Just so you know.

This is my preferred case:
Image

From DesignSpark @ RS components and other good re-sellers. If you fit heatsinks to your Pi you'll need to do a bit of work on the internal plastic bits to make it fit. The case is ventilated well, perforated base, an air gap all the way around the top cover with a ventilated Raspberry logo on top. Unfortunately there are no holes to see the LEDs but you can easily add a couple next to the SD card slot.

If adding a DAC tophat, HiFi Berry etc you are better off with their designer case as it will have the correct cutouts already made.
Only the Sith deal in absolutes.

Neal
Needs to get out more
Posts: 1943
Joined: Fri Aug 03, 2007 10:57 am
Location: From the land of the Bodgers

Re: General Raspberry Pi stuff

Post by Neal » Thu Jan 25, 2018 1:56 pm

Link to the Pimoroni SHIM shop web site Nick linked to earlier

https://shop.pimoroni.com/collections/r ... onoff-shim
Only the Sith deal in absolutes.

Neal
Needs to get out more
Posts: 1943
Joined: Fri Aug 03, 2007 10:57 am
Location: From the land of the Bodgers

Re: General Raspberry Pi stuff

Post by Neal » Thu Jan 25, 2018 2:22 pm

Helpful for those new to Linux: https://www.makeuseof.com/tag/15-useful ... ould-know/

Some others I've picked up, the obvious for updates
sudo apt-get update (package index update)
sudo apt-get upgrade (package upgrade)
sudo rpi-update (firmware and Kernel updates - ONLY DO IF REQUIRED/INSTRUCTED)

sudo apt-cache search 'package name' (searches for that package in the repository)
sudo apt-cache policy 'package name' (gives the version number of the package)

sudo apt-get check (checks for broken package dependencies)

sudo su (switch to Admin level so you don't need to type sudo on every command!)
Only the Sith deal in absolutes.

Neal
Needs to get out more
Posts: 1943
Joined: Fri Aug 03, 2007 10:57 am
Location: From the land of the Bodgers

Re: General Raspberry Pi stuff

Post by Neal » Thu Jan 25, 2018 2:31 pm

The default swap size when using the SD card is 100MB. I've maxed it out using the Pi as a desktop a couple of times. You can increase it by editing dphys-swapfile IE sudo nano /etc/dphys-swapfile

Find the line with 100 and change it to 200, cntrl-o to write it out, cntrl-x to exit. reboot.

htop is a good command to see the performance of all 4 cores, the memory allocation and swap usage, just run it from the command line. It's part of the latest 'stretch' build of Raspbian.
Only the Sith deal in absolutes.

User avatar
pre65
Amstrad Tower of Power
Posts: 18300
Joined: Wed Aug 22, 2007 11:13 pm
Location: North Essex

Re: General Raspberry Pi stuff

Post by pre65 » Wed Mar 14, 2018 9:37 am

Life is what happens to you while you're busy making other plans. John Lennon

G-Popz THE easy listening connoisseur. (Philip)

Neal
Needs to get out more
Posts: 1943
Joined: Fri Aug 03, 2007 10:57 am
Location: From the land of the Bodgers

Re: General Raspberry Pi stuff

Post by Neal » Wed Mar 14, 2018 8:15 pm

Yup already ordered!
Only the Sith deal in absolutes.

Neal
Needs to get out more
Posts: 1943
Joined: Fri Aug 03, 2007 10:57 am
Location: From the land of the Bodgers

Re: General Raspberry Pi stuff

Post by Neal » Wed Mar 14, 2018 8:20 pm

Little bit of PWR saving if running headless, turn off the hdmi port. For the OCD streamers it may help sound quality ?

Edit /etc/rc.local and add the following lines above exit 0:

# Disable HDMI
/usr/bin/tvservice -o

Or from the cli
/opt/vc/bin/tvservice -o

-p to turn it back on
Only the Sith deal in absolutes.

User avatar
jack
Social outcast
Posts: 3603
Joined: Wed Dec 29, 2010 8:58 pm
Location: ɐılɐɹʇsnɐ oʇ ƃuıʌoɯ ƃuıɹǝpısuoɔ
Contact:

Re: General Raspberry Pi stuff

Post by jack » Sat Mar 17, 2018 6:31 am

Neal wrote:
Wed Mar 14, 2018 8:15 pm
Yup already ordered!
PoE is long overdue. I've used RPis to turn big TVs into wallboards for Jira and similar - these had to be PoE and the PoE adapters were the same size as the Pi!

The 3B+ is a nice upgrade which ticks a whole load of boxes for stuff that was just not fully implemented...
Vivitur ingenio, caetera mortis erunt

Neal
Needs to get out more
Posts: 1943
Joined: Fri Aug 03, 2007 10:57 am
Location: From the land of the Bodgers

Re: General Raspberry Pi stuff

Post by Neal » Sat Mar 17, 2018 6:56 pm

Yup, think the product has matured nicely with this latetest version, although POE is via a top hat.

I’m trialing yodeck for a customer at the moment to cover their digital signage needs...
Only the Sith deal in absolutes.

Neal
Needs to get out more
Posts: 1943
Joined: Fri Aug 03, 2007 10:57 am
Location: From the land of the Bodgers

Re: General Raspberry Pi stuff

Post by Neal » Tue Apr 03, 2018 9:29 am

Aha! My Pi3 B+ has finally arrived....
Only the Sith deal in absolutes.

Neal
Needs to get out more
Posts: 1943
Joined: Fri Aug 03, 2007 10:57 am
Location: From the land of the Bodgers

Re: General Raspberry Pi stuff

Post by Neal » Tue Apr 03, 2018 6:57 pm

This is so much faster, impressive.

Make sure to upgrade your OS install (stretch) if planning to go from a 3B to 3B+, it wont boot otherwise
Only the Sith deal in absolutes.

Post Reply