Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Raspberry Pi Blueprints

You're reading from   Raspberry Pi Blueprints Design and build your own hardware projects that interact with the real world using the Raspberry Pi

Arrow left icon
Product type Paperback
Published in Mar 2015
Publisher
ISBN-13 9781784392901
Length 284 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (12) Chapters Close

Preface 1. Raspberry Pi Pirate Radio FREE CHAPTER 2. Portable Speaker System 3. Mini Retro Arcade Cabinet 4. GPS-enabled Time-lapse Recorder 5. Home Theater PC 6. Outdoor Weather Station 7. Home Security System 8. Remote-operated Robotic Arm 9. Magic Mirror 10. Bottle Xylophone Index

Troubleshooting

This section details some of the common issues you may encounter while building this project and steps you can use to resolve them.

Notes are missed

The most common cause of missed notes is the delay between the note on event and note off event in the MIDI file. If the MIDI file is too short, it will not give the servo arm time to extend and retract. This can be rectified using the midi_note_expand.py script included in the code for this chapter.

This script can be run using the following command; here, MIDI_FILE is the filename of the MIDI file, DELAY is the desired minimum delay in milliseconds between note on and note off events, and TEMPO is the tempo you intend to play the file at (the delay time will vary depending on the tempo at which the file is played):

python midi_note_expand.py -f MIDI_FILE.mid -d DELAY -t TEMPO

This script will produce an output similar to that shown in the following screenshot. By default, it saves the modified file as MIDI_FILE_modified.mid. By...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image