A human-sized drum machine built with a Raspberry Pi, an Adafruit Feather SCORPIO, NeoPixels, and Go.
- Install Raspberry Pi Imager: https://www.raspberrypi.com/software/
- Choose
Raspberry Pi 5
,Raspberry Pi OS Lite (64-bit)
andUSB Mass Storage
in the Imager - Select:
Set hostname
toraspberrypi
Set username and password
:sig
Set locale
toen_US.UTF-8
Configure wireless LAN
Enable SSH
:Allow public-key authentication only
HOSTNAME=raspberrypi
HOSTNAME=raspberrypi5-2
HOSTNAME=raspberrypi5-3
HOSTNAME=raspberrypi5-4
HOSTNAME=raspberrypi5-5
HOSTNAME=raspberrypi5-6
ssh [email protected]
ssh sig@$HOSTNAME.local
ssh [email protected]
# install packages
sudo apt-get update
sudo sed -i 's/^# *\(en_US.UTF-8 UTF-8\)/\1/' /etc/locale.gen
sudo locale-gen
sudo dpkg-reconfigure locales
sudo apt-get install -y git tmux vim locales
# GITHUB_TOKEN=
git clone https://github.com/siggy/dotfiles.git ~/code/dotfiles
cp ~/code/dotfiles/.local.bash.pi ~/.local.bash
cp ~/code/dotfiles/.curlrc ~/
cp ~/code/dotfiles/.gitconfig ~/
cp ~/code/dotfiles/.tmux.conf ~/
cp ~/code/dotfiles/.vimrc ~/
cp ~/code/dotfiles/.wgetrc ~/
sed -i '/^[[:space:]]*helper = osxkeychain/ s/^/#/' ~/.gitconfig
mkdir -p ~/.vim/backups
mkdir -p ~/.vim/swaps
cp -a ~/code/dotfiles/.vim/colors ~/.vim
echo "[[ -s ${HOME}/.local.bash ]] && source ${HOME}/.local.bash" >> ~/.profile
sudo systemctl disable ModemManager.service
sudo systemctl disable NetworkManager-wait-online.service
sudo systemctl disable bluetooth.service
sudo systemctl disable dphys-swapfile.service
sudo systemctl disable fake-hwclock.service
sudo systemctl disable systemd-binfmt.service
sudo systemctl mask sys-kernel-debug.mount sys-kernel-tracing.mount
sudo systemctl mask rpi-eeprom-update
sudo systemctl disable e2scrub_reap.service
sudo dphys-swapfile swapoff
sudo apt-get -y purge modemmanager bluez triggerhappy
sudo apt-get -y autoremove --purge
sudo grep -q 'rootdelay=' /boot/firmware/cmdline.txt \
|| sudo sed -i 's/$/ rootdelay=2 modules-load=dwc2/' /boot/firmware/cmdline.txt
echo "PollIntervalMinSec=600" | sudo tee -a /etc/systemd/timesyncd.conf
curl -L -o /tmp/go1.24.4.linux-arm64.tar.gz https://go.dev/dl/go1.24.4.linux-arm64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf /tmp/go1.24.4.linux-arm64.tar.gz
export PATH=$PATH:/usr/local/go/bin
mkdir -p ~/code/
git clone https://github.com/siggy/bbox.git ~/code/bbox
For MCSPER USB to 3.5mm Audio Jack Adapter.
Plug in USB audio device and run:
sudo tee /etc/asound.conf > /dev/null <<'EOF'
pcm.!default {
type plug
slave.pcm "dmix:Audio,0"
}
ctl.!default {
type hw
card "Audio"
}
EOF
amixer
amixer -c 0 scontrols
amixer -c 0 set PCM 95%
For Plugable USB Audio Adapter with 3.5mm Speaker-Headphone and Microphone Jack.
Plug in USB audio device and run:
sudo tee /etc/asound.conf > /dev/null <<'EOF'
pcm.!default {
type plug
slave.pcm "dmix:Device,0"
}
ctl.!default {
type hw
card "Device"
}
EOF
aplay /usr/share/sounds/alsa/Front_Center.wav
sudo apt-get install -y libasound2-dev
go run cmd/bbox/main.go --fake-leds
go build -o /home/sig/bin/bbox cmd/bbox/main.go
cat <<'EOF' >> ~/.profile
if [ "$(tty)" = "/dev/tty1" ]; then
tmux attach -t bbox || tmux new-session -s bbox "bash -c '/home/sig/bin/bbox; exec bash'"
fi
EOF
sudo mkdir -p /etc/systemd/system/[email protected]
cat <<EOF | sudo tee /etc/systemd/system/[email protected]/override.conf
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin sig --noclear %I \$TERM
EOF
sudo systemctl daemon-reload
sudo reboot
cat <<'EOF' >> ~/.profile
export MINIAUDIO_ALSA_NO_MMAP=1
if [ "$(tty)" = "/dev/tty1" ]; then
tmux attach -t bbox || tmux new-session -s bbox "bash -c '/home/sig/bin/baux; exec bash'"
fi
EOF
IP=192.168.2.2
IP=192.168.2.3
IP=192.168.2.4
IP=192.168.2.5
IP=192.168.2.6
sudo nmcli con add type ethernet ifname eth0 con-name eth0-static ipv4.addresses $IP/24 ipv4.method manual
sudo nmcli con up eth0-static
HOSTNAME=raspberrypi
HOSTNAME=raspberrypi5-2
HOSTNAME=raspberrypi5-3
HOSTNAME=raspberrypi5-4
HOSTNAME=raspberrypi5-5
HOSTNAME=raspberrypi5-6
IP=192.168.2.2
IP=192.168.2.2
IP=192.168.2.3
IP=192.168.2.4
IP=192.168.2.5
IP=192.168.2.6
alias pi="ssh sig@$HOSTNAME.local"
alias pieth="ssh sig@$IP"
SSID=sigpi
SSID=sigpi5-2
SSID=sigpi5-3
SSID=sigpi5-4
SSID=sigpi5-5
SSID=sigpi5-6
rfkill list
sudo rfkill unblock wifi
rfkill list
sudo nmcli radio wifi on
sudo nmcli dev wifi hotspot ifname wlan0 ssid $SSID password showmethepi
nmcli dev wifi show-password
sudo nmcli connection modify Hotspot autoconnect yes
From laptop:
HOSTNAME=raspberrypi5-4
ssh sig@$HOSTNAME.local
nmcli connection show
sudo nmcli connection down Hotspot
docker run --rm \
--volume="$PWD/docs:/srv/jekyll:Z" \
--publish 4000:4000 \
--publish 35729:35729 \
-it jekyll/jekyll:4.2.2 \
jekyll serve --source /srv/jekyll --livereload
open http://0.0.0.0:4000/bbox/
- amplitude courtesy of (https://github.com/johnusher)
- Hardware keyboard courtesy of (https://github.com/kodachi614/macropaw)
- wavs courtesy of (http://99sounds.org/drum-samples/)
- proper LED simulator