Speaker for micro:bit

From Waveshare Wiki
Jump to: navigation, search
Speaker for micro:bit
Speaker-for-micro-bit-1.jpg

Speaker for micro:bit, onboard speaker, volume adjustable
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

{{{name6}}}

Introduction

More

This product is a mini buzzer expansion board based on micro: bit, which integrates the IC NS8002 bridge audio power amplifier, a high-quality speaker, and a headphone jack output plugin. The switcher allows you to choose a playback device, and it supports volume control.

Specification

  • Dimension:36.52mm*30.72mm
  • Operating Voltage: 2.0V~5.5V
  • Volume adjustable: support
  • Earphone jack: support

Pin Definition

Description Hardware Pins Function
3V3 3V3 3V3 Power Positive
GND GND Power Ground
0/Signal 0 Audio output pin

Hardware connection

There are two ways to connect this product

  1. Using the DuPont wires.
  2. Using alligator clip wires.

Note: Both of these two kinds o cables come along with the product.

Speaker cable.png

Device description

Speaker component.png
  1. Select audio device: Switch right for earphone output, switch left for speaker
  2. High quality speaker
  3. Ear[ones jack socket
  4. Volume control: Turn left to volume up, turn right to down

Programming Guide

Micor:bit has variety of programming methods like mbed, micropython, typescript and other programming methods, as well as code online websites which are abundant.

The official recommendation are two programming methods: typescript and micropython. Typescript is the graphical programming language.

Typescript

Typescript is a kind of graphical programming, its website is that: https://makecode.microbit.org/#

  • Open a browser and input the next URL

Open make.gif

  • Playing a musical melody and setting the beat

Click "music" on the left side, and place "play tone" inside "on start" block. First select a note, then set its beat. If your computer has playback device, it will play the corresponding voice.

Set music.gif

  • Playing music tones

First remove "play tone" by dragging it to the left side, then place “start melody” block inside "on start" block.

The first parameter is to chooes a melody, and the second parameter is the number of times to play the melody again.

Play music.gif

  • Download

Connect the micro:bit to the computer. It will appear as a removable drive of 8 MB. This time you can download the program into the micro:bot

Findmicrobit.gif


Choose a name for the project, save and download the HEX file. Copy the HEX file from the folder where it was saved and paste it onto the "MICROBIT" removable drive.

Speaker microbit down.gif

Micropython

For micropython, there are two ways to use it, one is use online programming website: http://python.microbit.org/v/1

And another is offline program software Mu.

  • Open the software

Open s.png

  • Opening the programming manual

Click the link below to open the micro:bit official programming manual

http://microbit-micropython.readthedocs.io/en/latest/index.html

Click music to copy the section code:

Copy micropython.gif

  • Download

Copy the code as the below step, and past it to the Mu. Click "check" for error checking, After no errors are found click Flash button, and select micro:bit and download it.

Speaker microbit flash.gif

Note: For more information about the programming, please refer to the programming manual.

Resources

Software

Support



Technical Support

If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)