Skip to content

mhamilt/jingle-bells-arduino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jingle Bells Arduino

     ___
   _|---|_
    ('>')___/
>--(`^'^')
  (`^'^'^`)
  `======='

Tis the season, so here are a couple of ways to play James Lord Pierpont's classic on an Arduino

Sketches

Jingle Bells

A simple, brute force way of playing through some notes. All notes of verse[] and chorus[] are stored in separate arrays. We then loop over these referencing the respective verseRhythm[] and chorusRhythm[] arrays.

The melody arrays end with a -1, which is a cute way of figuring out when to stop when you don't necessarily know the length of a static array.

for (int i = 0; verse[i] != -1; i++)

Wiring

In the current sketch, the output is always on pin 10, though this can be changed.

You can use either a piezo buzzer

Or clip straight to your headphones with jumper wire and crocodile clips.

In either case make sure you are using pin 10, or whichever pin you have dictated to use.

About

Tis the season, so here are a couple of ways to play James Lord Pierpont's classic on Arduino

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published