BACK-TO-SCHOOL Sale

All product get 10% Off

How to make a guitar with a micro:bit ?

Purpose

To make a guitar with a micro:bit and an ultrasonic sound sensor.

Materails

micro:bit x 1

Nezha expansion board x 1

Sonar:bit x 1

RJ11 wire x 1

Bricks x N

Assembly steps

Build a device as the picture shows:

Hardware Connections

Connect the sonar:bit to J1 port on Nezha expansion board.

Software programming

Go to MakeCode editor:(https://makecode.microbit.org/#editor)Add Wukong extension from the settings on the right upper conner.

Search with Planet X in the dialogue box and add it to the package.

Coding:

Drag “show icon” into the “on start” brick, save the detected value from the sonar:bit as “I” and judge if it’s between the setting ranges. If yes, set the buzzer to play the tones.

Code more with the slimar procedure and pause for 500ms.

Link:https://makecode.microbit.org/_Rv53CyYY03hg

Result

Change the tones of the micro:bit guitar from adjusting the distances from the bricks board to sonar:bit.

Leave a Reply

Your email address will not be published. Required fields are marked *

images
In March, ELECFREAKS supported 5 schools to carry out school science and technology festival activities
images
Children’s Programming Education is the Future Trend
images
Technical verification! Nezha series products can complete WRO competition tasks
images
Let's take part in the Ceremony of the New Factory of ELECFREAKS together!
images
Bluetooth Bee(HC-05 and HC-06) User Guide
images
In March, ELECFREAKS supported 5 schools to carry out school science and technology festival activities
Monthly Archive