A Wireless Musical Keyboard Project

This activity demonstrates how to design and play a simple wireless musical keyboard using three pushbuttons, a piezospeaker and two RF Transceiver modules. Two HomeWork boards will be used: one outfitted with three pushbuttons and an RF Transceiver module for transmitting data, and the other with a piezospeaker and an RF Transceiver module for receiving data. When complete, you will be able to press buttons on one board and a tone will play through the piezospeaker on the other.

Getting Started

If you are new to the BASIC Stamp microcontroller or to programming, it would be a good idea to review the following before beginning:

  • Complete the following chapters in What’s a Microcontroller? 
    • Chapter 1 (Getting Started)
    • Chapter 3, Activities 2 & 3 (Pushbutton Control)
    • Chapter 8, Activity 5 (SELECT…CASE statements)
  • Read the 433 MHz RF Transceiver Documentation for tips on using these RF modules

 

Parts List

(2) HomeWork Boards with BASIC Stamp 2 (#28158)
     The BASIC Stamp 2 on a Board of Education (#28103) is also suitable for this activity
(2) 433 MHz RF Transceivers (#27982)
(1) Piezospeaker (#900-00001)
(3) Pushbuttons (#400-00002)
(5) 220 Ω resistors (#150-02210)
(3) 10 kΩ resistors (#150-01030)

 

Source Code

Source code for the Wireless Musical Keyboard