Project b5 computer music box – Elenco Snap Circuits XP &reg User Manual

Page 38

Advertising
background image

-37-

The microcontroller can be programmed to produce cute sounds
in different ways. This project demonstrates some of them.

Build the circuit shown; it is simpler than the preceding circuit
but does not have a volume control. Turn on the slide switch (S1).
Load any of the programs listed here into the microcontroller
(U21) using the programming instructions in project B1. The
microcontroller will play a tune and may flash lights. You have a
computer music box!

A. Use program Computer Music Box.
B. Use program Make a Sound.
C. Use program Ascending Sound.
D. Use program Robotic Sounds.

Project B5

Computer Music Box

Optional:

This program plays a song in the
microcontroller’s memory. Change the
0 to a 1, 2, or 3 to change the song.

This program plays a sequence of musical notes. The sequence in
parenthesis is the musical notes (ranging from 0 to 255) and their
durations (all values here are 100, so each note plays for 1 second).

Advertising