https://github.com/microbit-foundation/pxt-sound-level-db
Get the micro:bit V2 sound level in decibels (dB) - beta
https://github.com/microbit-foundation/pxt-sound-level-db
Last synced: 10 months ago
JSON representation
Get the micro:bit V2 sound level in decibels (dB) - beta
- Host: GitHub
- URL: https://github.com/microbit-foundation/pxt-sound-level-db
- Owner: microbit-foundation
- License: mit
- Created: 2024-11-25T15:06:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-29T12:24:45.000Z (10 months ago)
- Last Synced: 2025-08-29T14:29:58.741Z (10 months ago)
- Language: C++
- Homepage:
- Size: 193 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# sound level (dB) block
## Block Usage
This extension adds one block to the "Input ... more" section.
The ``||input.soundLevelDb||`` block returns the level of sound detected by the microphone in decibel (dB) units.
```blocks
basic.showNumber(input.soundLevelDb())
```
This block is compatible with micr:bit V2 only, if the block is used with a micro:bit V1 board the 927 error will scroll on the screen.
## Use as Extension
This repository can be added as an **extension** in MakeCode.
* open [https://makecode.microbit.org](https://makecode.microbit.org)
* click on **New Project**
* click on **Extensions** under the gearwheel menu
* search for **Sound Level in decibels** and import
#### Metadata (used for search, rendering)
* for PXT/
makeCodeRender("{{ site.makecode.home_url }}", "{{ site.github.owner_name }}/{{ site.github.repository_name }}");