https://github.com/happybono/xmasiccard
Christmas music card with Arduino Uno
https://github.com/happybono/xmasiccard
arduino arduino-uno beginner christmas christmas-music-card cpp duration hour-of-code learn-to-code music musiccard piezo tone
Last synced: 2 months ago
JSON representation
Christmas music card with Arduino Uno
- Host: GitHub
- URL: https://github.com/happybono/xmasiccard
- Owner: happybono
- License: mit
- Created: 2019-12-18T06:22:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-23T07:01:37.000Z (over 6 years ago)
- Last Synced: 2025-02-12T05:45:46.416Z (over 1 year ago)
- Topics: arduino, arduino-uno, beginner, christmas, christmas-music-card, cpp, duration, hour-of-code, learn-to-code, music, musiccard, piezo, tone
- Language: C++
- Size: 1.34 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# XMasicCard
Christmas music card with Arduino Uno
## Specifications
### Scenarios
* When the recipient opens the Christmas Card, background music will be played automatically.
* Supports multiple songs, one randomly selected song will be played per time.
### Connections
* 1x Micro-USB (Power)
## Apparatus (Equipments)
- Arduino Uno R3 + USB A-to-B Cable
- 1x Christmas Card
- 1x Breadboard
- 4x Jumper Wires
- 1x Piezo Buzzer
- 1x Copper Conductive Sticky Tape
- 1x Adhesive Transparent Sticky Tape
- 2x Magnets
- 1x Super Glue
- 1x Portable Battery
## Schematics

## Code to Note
One of Arduino's many useful built-in commands is the tone() function. This function drives an output pin at a certain frequency, making it perfect for driving buzzers and speakers. If you give it a duration (in milliseconds), it will play the tone then stop. If you don't give it a duration, it will keep playing the tone forever (but you can stop it with another function, noTone()).
tone(PIEZO, notes[i], time[i]);