Skip to content

jsubirat/rpi-pcspeaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

# rpi-pcspeaker by jsubirat
#
# Enables the user to reproduce musical notes with a Raspberry Pi and a classical PC speaker, 
# depending on the introduced keyboard key.
# 
# Prerequisite: apt-get install python-dev python-rpi.gpio 
#
# Connections:
#       * Speaker + - GPIO 23 (can be modified in SPEAKERPORT variable)
#       * Speaker - - GND, via a 220 Ohm - 1.2 kOhm resistor (see NOTE)
#
# The polarity doesn't matter as long as it is a classical PC speaker.
# NOTE: From what I read in the forums, a maximum of 16mA should be drawn from an individual GPIO port. 
# If the PWM is working at 100% duty cicle, this implies using a 220 Ohm resistor. The total amount of
# current drawn from ALL the 17 GPIO ports should be 50mA at most. This implies that each port should
# draw at most 3mA, when all are used. In this case, use a 1.2 kOhm resistor instead.
# Note that GPIO v0.5.2a is required to have software-PWM.

About

PC Speaker interfacing with a Raspberry Pi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages