Chapter 4
Adding Sound and Motion to Your BASIC Stamp Projects
IN THIS CHAPTER
Making sound with a piezo speaker
Using the FREQOUT command to create frequencies
Making music
Creating motion with a servo
Using the PULSOUT command to generate servo pulses
In this chapter, you learn how to work with devices that add sound and motion to your BASIC Stamp projects. To create sound, you can add a piezo speaker to create audible output tones. This is useful in situations where your BASIC Stamp program might need to get someone’s attention or when you want to create a sound effect. To create motion, you can add a very useful device called a servo, which lets you control mechanical motion with a BASIC Stamp program.
Using a Piezo Speaker with a BASIC Stamp
The BASIC Stamp Activity Kit comes with a small piezoelectric speaker, which you can connect directly to an I/O pin to create beautiful music. Well, the music probably won’t be so beautiful, but you can coax the BASIC Stamp into emitting ...
Get Electronics All-in-One For Dummies, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.