Skip to Main Content
BBC micro:bit Recipes: Learn Programming with Microsoft MakeCode Blocks
book

BBC micro:bit Recipes: Learn Programming with Microsoft MakeCode Blocks

by Pradeeka Seneviratne
June 2019
Beginner content levelBeginner
367 pages
6h 3m
English
Apress
Content preview from BBC micro:bit Recipes: Learn Programming with Microsoft MakeCode Blocks
© Pradeeka Seneviratne  2019
Pradeeka SeneviratneBBC micro:bit Recipeshttps://doi.org/10.1007/978-1-4842-4913-0_11

11. Playing Music

Pradeeka Seneviratne1 
(1)
Udumulla, Mulleriyawa, Sri Lanka
 

In this chapter, you will learn how to use the Music package of the MakeCode for micro:bit to build and play simple tunes. MakeCode allows you to build music by combining music tones, octaves, beats (duration), accidentals (flats and sharps), and so forth. You can also use the built-in melodies with your applications.

11-1. Connecting a Speaker to Pin 0

Problem

You want to connect a speaker to the micro:bit pin 0.

Solution

Connect the speaker with the micro:bit using alligator (crocodile) clips as explained below.
  • Connect one wire to pin0 and the other wire to ground ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning e-Textile Development: Prototyping e-Textiles with Wearic Smart Textiles Kit and the BBC micro:bit

Beginning e-Textile Development: Prototyping e-Textiles with Wearic Smart Textiles Kit and the BBC micro:bit

Pradeeka Seneviratne

Publisher Resources

ISBN: 9781484249130Purchase LinkPublisher Website