Skip to content

Instantly share code, notes, and snippets.

View Pindar's full-sized avatar

Simon Dittlmann Pindar

View GitHub Profile
[Unit]
Description=Playing zeros
# https://raspberrypi.stackexchange.com/questions/74456/i2s-dac-device-support-kernel-drivers-and-noise-pop-crackle-on-playbac
After=alsa-restore.service
Requires=alsa-restore.service
[Service]
TimeoutSec=0
User=pi
ExecStart=/usr/bin/aplay -D default -c 2 -f S16 -r 48000 /dev/zero
@Pindar
Pindar / pishutdown.py
Created July 7, 2018 07:14
pishutdown
#!/usr/bin/env python3
# shutdown/reboot(/power on) Raspberry Pi with pushbutton
import RPi.GPIO as GPIO
from subprocess import call
from datetime import datetime
import time
from signal import pause
# pushbutton connected to this GPIO pin, using pin 5 also has the benefit of
@Pindar
Pindar / .env
Last active July 17, 2018 21:09
automate-powerplug-stereoanlage
HUE_HOST=192.168.XX.XX
HUE_USER=iglksjflXXXXXXXXX
LIGHT_NUMBER=00
@Pindar
Pindar / .A.README.md
Last active January 6, 2019 09:57
This script acts as Slack Bot to post one tip once a day to a defined channel.

Tip Of The Day Bot

This script acts as Slack Bot to post one tip once a day to a defined channel.

@Pindar
Pindar / README.md
Last active March 30, 2019 18:22
Raspotify with HifiBerry

To use raspotify properly with HifiBerry on raspberry pi 2 (kernel 4.19.29-v7)

  1. Compile https://github.com/librespot-org/librespot
sudo apt-get install build-essential libasound2-dev
curl https://sh.rustup.rs -sSf | sh
cargo build --release --features alsa-backend
  1. Point /etc/systemd/system/raspotify.service to compiled binary from (1), e.g. /home/pi/librespot/target/release/librespot