Exploring Number Lines & Making Music With @Brainpadboard

1
Exploring Number Lines & Making Music With @Brainpadboard

Hello World!

If you have been following me recently, you will have noticed my new found love for this amazing STEAM gadget called brainpad. Brainpad is a fairly new product to the scene which has taken the best ideas from other products and put them all nicely in one little package. This board contains  different coloured lights, multiple button inputs, servo control and even an LCD screen!

In this post, I wanted to explore the accelerometer and test the onboard speaker. I have come to learn the range of motion for both X and Y is -1023 -> +1023.

The goal for this simple project is to play four different music notes based on the x,y positions as follow:

If X<0 Play Low C

Else: Play High B

If Y<0 Play Low C#

Else: Play High A#

If you are interested in learning more about Scratch, Micro:Bit or Python, head on over to our new Code Breaker courses hosted here.

I like the auditory differentiation this gadget has to offer. As students tilt the device, the notes will change. The source code, using Microsoft MakeCode, can be found below.


So far so good. I gave it a test run. Remember, remind students to “debug often.”

Check out @brainpadboard - an exiting new STEAM tool! #CodeBreaker Click To Tweet





My next task is to make use of the LCD screen. I want to print the x,y position of the Brainboard in realtime as I tilt it. This can be done using the Display category and using the ShowValue ” ” at Line __ block. In my example I will print the X position at line 1 and the Y position at line 2.

Lastly, lets put it all together and record a demo! For those reading this post on my blog, the video is embedded below. For those reading from an email, click here to watch the video!

Perhaps most import about about MS MakeCode is the ability to view, edit and program in JavaScript. Here is the syntax for the project written in JS.

Have yourself a go with the virtual simulator and be sure to check out brainpad.com

 

Subscribe to this blog to be informed of new posts, tools, and gadgets!

Enter your email address below:

For more lessons, activities and ideas, grab a copy of my book, Code Breaker, on Amazon here!

(Visited 960 times, 1 visits today)

Leave a Reply

Name
Name*
Email
Email *
Website
Website