Part 1
요약·해설
v1 외장 buzzer, v2 내장 speaker와 board별 build target을 설명합니다.
P0 external piezo
On-board speaker
5×5 frequency display
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
227DD715F99D67221FF96E6BBF376996BA03A418E17F3F36C69E548561D4985A
.. _microbit_sound:
BBC micro:bit sound
###################
Overview
********
This sample demonstrates how to use a piezo buzzer connected
to port P0 on the edge connector of the **BBC micro:bit v1** or
using the on-board buzzer on the **BBC micro:bit v2**.
Requirements
************
Using **BBC micro:bit v1**, a separate piezo buzzer must be connected to the board.
One example is the MI:Power board that has a piezo buzzer in addition to a
coin-cell battery. Resellers of this board can be fairly easily found using online search.
The upgraded **BBC micro:bit v2** board does not need a separate buzzer as it has one
built-in on the backside of the board (marked as 'speaker').
Building and running
********************
The sample can be built as follows:
Building for a BBC micro:bit v1
-------------------------------
.. zephyr-app-commands::
:zephyr-app: samples/boards/bbc_microbit/sound
:board: bbc_microbit
:goals: build flash
:compact:
Building for a BBC micro:bit v2
-------------------------------
.. zephyr-app-commands::
:zephyr-app: samples/boards/bbc_microbit/sound
:board: bbc_microbit_v2
:goals: build flash
:compact:
Sample Output
=============
This sample outputs sounds through a piezo buzzer based on
button presses of the two main buttons. For each press the current
output frequency will be printed on the 5x5 LED display.
Part 3
한국어 전문 번역
개요
이 sample은 BBC micro:bit v1 edge connector의 P0 port에 연결한 piezo buzzer 또는 BBC micro:bit v2의 on-board buzzer를 사용하는 방법을 보여줍니다.
요구사항
BBC micro:bit v1을 사용한다면 별도의 piezo buzzer를 board에 연결해야 합니다. 한 가지 예는 coin-cell battery와 piezo buzzer를 함께 제공하는 MI:Power board입니다. 이 board의 판매처는 인터넷 검색으로 비교적 쉽게 찾을 수 있습니다.
개선된 BBC micro:bit v2 board는 뒷면에 speaker라고 표시된 buzzer가 내장되어 있으므로 별도 buzzer가 필요하지 않습니다.
Build와 실행
Sample은 다음과 같이 build할 수 있습니다.
BBC micro:bit v1용 build
west build -b bbc_microbit samples/boards/bbc_microbit/sound
west flash
BBC micro:bit v2용 build
west build -b bbc_microbit_v2 samples/boards/bbc_microbit/sound
west flash
Sample 출력
이 sample은 두 main button을 누르는 동작에 따라 piezo buzzer로 소리를 출력합니다. Button을 누를 때마다 현재 출력 frequency가 5×5 LED display에 표시됩니다.
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.