zephyr/samples/boards/bbc_microbit/sound
Kumar Gala f8f044249c samples: boards: Convert to new DT_INST macros
Convert older DT_INST_ macro use the new include/devicetree.h
DT_INST macro APIs.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-03-31 07:14:21 -05:00
..
src samples: boards: Convert to new DT_INST macros 2020-03-31 07:14:21 -05:00
CMakeLists.txt cmake: use find_package to locate Zephyr 2020-03-27 16:23:46 +01:00
README.rst
prj.conf
sample.yaml

README.rst

.. _microbit_sound:

BBC micro:bit sound
###################

Overview
********

This is simple example demonstrating how to use a piezo buzzer connected
to port P0 on the edge connector of the BBC micro:bit board. Note that
the buzzer is not part of the main micro:bit board, rather it it needs
to be separately acquired and connected. A well working 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.

Building
********

The sample can be built as follows:

.. zephyr-app-commands::
   :zephyr-app: samples/boards/bbc_microbit/sound
   :board: bbc_microbit
   :goals: build
   :compact:

Sample Output
=============

This sample outputs sounds through a connected 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.