hArduino-1.1: Control your Arduino board from Haskell.

Copyright(c) Levent Erkok
LicenseBSD3
Maintainererkokl@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

System.Hardware.Arduino.SamplePrograms.JingleBells

Description

A (pretty bad!) rendering of Jingle Bells on a piezo speaker

Synopsis

Documentation

jingleBells :: [(Note, Duration)] Source

Notes for jingle-bells. Expecting a nice rendering from this encoding on a piezo speaker would be naive.. However, it's still recognizable!

main :: IO () Source

Play the jingle-bells on a PWM line, attached to pin 3. We use a tempo of 75; which is fairly fast. For a slower rendring try 150 or higher values.

The circuit simple has a piezo speaker attached to pin 3.