Day 1 — Superchería

Published at: July 23, 2020
Last modified: July 23, 2020
cd ..

The first thing I did was solder the amplifier headers and connect it to the speaker. Now, it’s time to setup the Raspberry.

Raspberry Pi Setup

I flashed a copy of Raspbian Buster Lite (now called Raspberry Pi OS) into a 16 GB MicroSD with Etcher (I love Etcher <3). Then, I did some things to the files inside the MicroSD to activate SSH and WiFi headlessly:

  1. I disconnected and connected the MicroSD to my PC.
  2. I went to the boot drive (with Ubuntu, it was in /media/$USER/boot).
  3. I created an empty ssh file with no extension.
  4. And finally, I created a wpa_supplicant.conf file with this data:
wpa_supplicant.conf
country=AR
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
  ssid="WIFI_SSID"
  scan_ssid=1
  psk="WIFI_PASSWORD"
  key_mgmt=WPA-PSK
}

Then, I inserted the MicroSD into the Raspberry and turned it on. With the steps above done, now I can ssh in with ssh pi@raspberrypi.local (or pri@192.168.X.X) with the password raspberry.

Then, I did what any Linux-user does:

$ sudo apt-get update && sudo apt-get upgrade -y
$ sudo apt-get install python python-pip python3 python3-pip -y
$ passwd

If you have the error Can't set locale; make sure $LC_* and $LANG are correct!, you should sudo dpkg-reconfigure locales and select your locale (I selected en_GB.UTF-8 and es_AR.UTF-8… just in case).

Speaker Setup

All was stolen from Adafruit, shh!

At first, I connected the pins.

Raspberry PiAmp
5VVin
GNDGND
GPIO18BCLK
GPIO19LRCLK
GPIO21DIN

Then, I run curl -sS https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/i2samp.sh | bash and rebooted. That was… very easy.

Testing sound

At first, I run speaker-test -c2. You should hear a continuous white noise. If you hear white noise - silence - white noise - silence, check your soldering. If it says “Device or resource busy”, try erasing your MicroSD and starting again.

After that, I installed SoX (sudo apt-get install sox libsox-fmt-all), downloaded Superchería and run play supercheria.mp3:

This one's for Vitale for helping me with the Amp

← Day 0 | Day 2 →