Skip to content

LordofBone/nap_button

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hardware

This is meant to be used with my Nap Button project, so you can follow the build instructions here. Although it should work with pretty much any Linux system that has a speaker, some code may just need tweaking.

Install

  1. Clone this repo onto a Raspberry Pi running Raspberry Pi OS Legacy (32-bit)
  2. Run the installation instructions for the Speaker pHAT here
  3. Set the program to run in ~/.bashrc (or whatever you use to run it on boot, bashrc will run it on login) sudo nano ~/.bashrc Add the following lines at the end and save the file.
sudo chmod +x ~/nap_button/boot.sh
~/nap_button/boot.sh
  1. Place your sleep assisting audio into the audio folder and rename it to 'sleep_noise.mp3' (by default it is set to play this filename)
  2. Configure the nap button to your liking by editing the config/nap_button_config.py file where you can change the name of the audio file, the button pin, volume and button debounce time.
  3. Make the SD Card read-only, following the instructions here

About

Code for my Nap Button project; that produces white noise on a button press to help someone sleep.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published