Amateur Radio, Traveling in Blanquillo AND MORE
  • Home
  • Amateur Radio
    • Amateur (Ham) Radio >
      • 2026 >
        • 05-15-Navy-ships-bell
        • 01-24 Mesh BT and Meshcom
        • 01-20 Meshtastic configuration
        • 01-20 Lilygo T-Deck Plus
        • 01-06 Meshtastic/core
        • 01-04 Linux
        • 01-03 Digital Voice
      • 2022 >
        • 07-05 Winlink
        • 03-07 Antenna on mast
        • 02-27 AREDN
      • VE Credentials
  • Camping
    • 2011 >
      • Gold Beach
    • 2014 >
      • 2014 Utah
    • 2015 >
      • 2015 Bryce-Zion
      • 2015 Lava Beds
      • 2015 Bristlecone-Yosemite
      • 2015 July first trip
    • 2016 >
      • 2016 Glacier-Yellowstone
      • 2016 Southwest
    • 2017 >
      • 2017 Olympic
      • 2017 Channel Islands
      • 2017 Eclipse
    • 2018 >
      • 2018 So.California
      • 2018 Colorado-Arizona
      • 2018 Banff-Jasper
      • 2018 Osoyoos, BC
    • 2019 >
      • 2019 Crater Lake
      • 2019 Westside Regional Park
    • 2020 >
      • 2020 Sierras
    • 2021
    • 2022 >
      • 2022 Tennessee
      • 2022 Blue Ridge Parkway
    • 2023 >
      • 2023 Colorado
    • Camping Map
    • Our Escape
    • Links
  • Hobbies
    • Christmas LED Display
    • Scripts for Electronics >
      • 12- WeatherFIles
      • 11- sketch_MorseCodeDecoder.ino
  • Contact
  • Home
  • Amateur Radio
    • Amateur (Ham) Radio >
      • 2026 >
        • 05-15-Navy-ships-bell
        • 01-24 Mesh BT and Meshcom
        • 01-20 Meshtastic configuration
        • 01-20 Lilygo T-Deck Plus
        • 01-06 Meshtastic/core
        • 01-04 Linux
        • 01-03 Digital Voice
      • 2022 >
        • 07-05 Winlink
        • 03-07 Antenna on mast
        • 02-27 AREDN
      • VE Credentials
  • Camping
    • 2011 >
      • Gold Beach
    • 2014 >
      • 2014 Utah
    • 2015 >
      • 2015 Bryce-Zion
      • 2015 Lava Beds
      • 2015 Bristlecone-Yosemite
      • 2015 July first trip
    • 2016 >
      • 2016 Glacier-Yellowstone
      • 2016 Southwest
    • 2017 >
      • 2017 Olympic
      • 2017 Channel Islands
      • 2017 Eclipse
    • 2018 >
      • 2018 So.California
      • 2018 Colorado-Arizona
      • 2018 Banff-Jasper
      • 2018 Osoyoos, BC
    • 2019 >
      • 2019 Crater Lake
      • 2019 Westside Regional Park
    • 2020 >
      • 2020 Sierras
    • 2021
    • 2022 >
      • 2022 Tennessee
      • 2022 Blue Ridge Parkway
    • 2023 >
      • 2023 Colorado
    • Camping Map
    • Our Escape
    • Links
  • Hobbies
    • Christmas LED Display
    • Scripts for Electronics >
      • 12- WeatherFIles
      • 11- sketch_MorseCodeDecoder.ino
  • Contact

Playing Navy Ships Bell on a Raspberry Pi

Picture
A friend who is a Navy veteran is planning to attend a reunion and had found a Navy ship speaker.  He asked if I could help him program a Raspberry Pi to play Navy ships bell.  (I had taught a workshop a few years ago on Raspberry Pi basics and he attended.)  The speaker is an 8 ohm speaker and I thought "how hard can it be?"  I started searching for a way to play sounds through a speaker and how to attach it to a Raspberry Pi.

I found a project on GitHub that included a python program to play the ship bells and included the bells as mp3 files:  https://github.com/ralfholly/ships-bell

I needed the hardware to attach to a Raspberry Pi to play sounds on a speaker.  The Pi includes audio but only works for headphones.  I went to my usual source for Pi things, Adafruit.com, and found their Speaker Bonnet, a small board that plugs into a Pi and includes a 3 watt amplifier to play to stereo speakers.  This sounded fine, so I ordered two.  Why two?  Because if I have any problem with one of them, I have a backup to try.  I also ordered a pair of "stereo enclosed speakers 3W" so I had a known good speaker pair to try.  

On Adafruit's web site, I found information on how to set up the Speaker Bonnet at 
https://learn.adafruit.com/adafruit-speaker-bonnet-for-raspberry-pi 
I followed their instructions for Raspberry Pi Setup and -- nothing.  No sound came from the speakers.  After some searching, I found a posting in their forum that described a similar problem but not exactly mine.  I tried applying what I learned in that posting but still had no luck so I posted my problem in the same forum.  I got a response from them.  It didn't fix my problem but started us on a journey to a solution.  My forum posts and their responses are at
https://forums.adafruit.com/viewtopic.php?t=223575

They had to update their installation script to deal with the changes in my environment and PI OS versions.  I ended up using the latest version of PI OS, Trixie 64-bit with desktop.  I wanted the desktop so I had a web browser available so I could copy and paste any code needed.

I found that if I attached an HDMI monitor to the Pi, then the sound played through the HDMI monitor and not through the Speaker Bonnet, so I ended up disconnecting the monitor and using RealVNC to connect virtually to the Pi.  I also learned from this that the prior problems with RealVNC not working with the latest Pi OS software were resolved nicely.

I finally had the Speaker Bonnet working with their test programs.  I downloaded the Ships Bell project and started out to make that work.  I had to make some edits to the python code to get it working.  And now I have a working ships bell.  The ships bell plays one bell at the first half hour in a 4 hour shift, followed by one more bell each half hour for a total of four hours.  At that time, it plays 8 bells.  On the hour, the two bells are played as a two bell pair.  On the half hour, there are the two bell pairs for the hour followed by one bell for the half hour.  This makes it easy to hear what the time within the shift it is.

That was fine and accomplished my goal of having a ships bell on the Pi.  Now I wanted to play something else like an .mp3 file or ideally, something streaming from the Internet.  I found VLC Media Player already installed on the Pi as part of the desktop, so I checked what it would do.  It will play a sound file like a .mp3 file and it also included some links to Internet streaming.  In the links, I found Classical FM Radio at https://classicalfmradio.com

It provides streaming of classical recordings by a variety of artists who want to get their music heard by a larger audience, and I have found it pleasant to listen to while I am working, like while I am typing this entry.  I found that I could use a web site that included streaming so I no longer use VLC Media Player but go directly to the web site.
Picture
This is a good use for an extra Pi 4 that I had and now have put to use along with some old Realistic Minimus-17 speakers that I got at a ham radio swap meet.
Copyright © 2026 by Dornbush Web Design