harp_small

Laser harp

Build your own laser harp that uses light beams to trigger notes and reacts to movement! Learn the basics of programming, electronics, and working with sensors in a fun way - ideal for teaching music, physics, and for playing and exploring at home.

Description

The Laser Harp is a creative electronic kit that is a fun introduction to the world of programming, music and sensors. It uses beams of light to detect hand movements and convert them into tones. But the possibilities don't end with music - thanks to the micro:bit and an expansion board, you can also use the signals to control motors, LED strips or other devices.

The harp is an ideal teaching tool for school projects and home exploration. It allows children and adults to develop imagination, fine motor skills and technical skills. In combination with a second micro:bit and radio communication, the harp can be used as a wireless controller for other robotic systems. Programming takes place in the MakeCode or Python environment, making it suitable for both complete beginners and advanced creators.

Connection

The connection of the components to our expansion board can be found in the diagram. It is important to connect all components to voltage, from pins 3V3 and GND. You can supply power to each component separately, or supply it to only one and branch it out (but you need to make your own wires for this). To connect the lasers, you need to use 30 cm dupont wires, or connect shorter cables. Next, we need to read digital information from the photoresistors. Therefore, we will connect their output to pins P0, P1, P8, P9 of the expansion board.

Program

Deep Purple

Now let's describe our sample program. At the beginning, we need to set the pins on which we read information from the sensors to high. Then we just need to constantly check whether the signal from the sensor is interrupted and tell the micro:bit what tone to play. In our case, the tones from the famous song “Deep Purple: Smoke on the Water” are used. If no sensor is interrupted, the program stops all sounds.

Tasks

Task 1: Sound effects

Change the program to play sound effects of your choice from the library instead of individual tones Hudba.

Task 2: Watchman

Create a program that will play a tone only when the laser hits the photoresistor in reverse turns outThis means that you must never take your hand away, otherwise the alarm will go off!

Task 3: Lighting up the display

Modify the program so that when each signal is interrupted, an icon appears on the display. Each “string” will represent a different icon. Alternatively, you can light up the columns of the display corresponding to each “string”.

Task 4: Futuristic control console

If you own a servo motor, which is included in all our kits and construction sets, turn your harp into a futuristic control console. Use individual sensors to rotate the servo motors in different directions.

Gallery