Introduction: Arduino Chiptunes-Yet Again...Install an Arduino Library
Thank you to Drew Crawford for an awesome tune.
I will also teach you how to install an Arduino Library Code.
Step 1: Parts.
1 Arduino Uno
1-3 Piezos/ Speakers
1 Audio Output Jack.
Step 2: Program and Install a Library
- Unzip the zip file and inside, you should find two files. Ignore the demos for now.
- Go to bassdll.
- You should see 4 files. bassdll.cpp, bassdll.h, debug.cpp and debug.h. Basically if you see .cpp and .h files, take it as a library.
- Go outside the bassdll folder. Open your sketchbook folder and make a folder called libraries.
- Copy bassdll to the libraries folder in your sketchbook.
- Now restart the Arduino IDE and go to Sketch-Import Library and then Contributed. Click on bassdll. If all went well, you should have two include statements at the top of your sketch. Now, close that sketch.
- Next, move demos to your sketchbook folder in your file browser.
- Open up the Arduino IDE and go to where you saved demos. Go to core2 and hit Verify.
- It should compile correctly. Essentially, the code must be moved to your sketchbook folder and opened. The library helps it with defining things.
- Now, Upload.
Step 3: Build.
Follow the Fritzing schematic to build. The resistors should be 1k but they sadly are not. Fritzing does not have 1k resistors.
The 1k resistors are used to mix the output on one speaker. Otherwise, you could have three speakers/piezos.
I decided on a shield but that's optional.
Step 4: Listen.
When you power the Arduino up it should start playing.
Hope you liked this ible and leave a comment if you have questions or, comments. :-)