jcarolinares / python_school_bell_alarm_with_music

A bell alarm program designed to play a song some time every day inside a computer or a raspberry pi in a school

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python school bell alarm

A bell alarm program designed to play a song some time every day inside a computer or a raspberry pi in a school

Original idea from Felo Couto

Hope you'll find useful!

Preview video

Made by Julián Caro Linares

How to use

Python version and libraries:

  • Python 3
  • Pygame

First of all, if you don't have Python 3.X on your computer, you'll need to install it.

Official Python 3 page

You'll also need the library Pygame:

$ apt-get install python-pygame

Or

$ pip3 install pygame

You have to put a sound file in the same folder of the program, by default the file has to be named as "music.wav". I highly recommend to use a wav file but I think you can also uses anothers music formats without problems.

Now executes the python program "school_bell.py" using python3:

  • Put the hour (example: 14)

  • Put the minute (example: 10)

  • Put the play time of the song in seconds (example: 30)

  • By default the fadeout effect will be two seconds, but you can change this fadeout time inside the code (Alarm.self.fadeout)

The program will play the song and waits until the next alarm (next day, same hour). It's a True loop. To stop the program just put Ctrl+Z inside the terminal

=============

Licencia Creative Commons
School bell alarm por Julián Caro Linares licensed by Creative Commons Attribution-ShareAlike 4.0 International License.

About

A bell alarm program designed to play a song some time every day inside a computer or a raspberry pi in a school


Languages

Language:Python 100.0%