Skip to content

활동

Sound meter

초급 | MakeCode, Python | LED, 마이크 | 데이터 처리, 입력/출력

1단계: 만들어 보세요.

프로젝트 소개

Measure how noisy it is around you using the new micro:bit's microphone sensor and a simple bar chart display.

소개

프로그래밍 가이드

학습 내용

  • How to use the new micro:bit's built-in microphone input sensor to measure how loud sounds are around you
  • How to display numerical data from input sensors graphically on the LED display output

설명

  • The new micro:bit's microphone measures sound levels in numbers between 0 and 255. 0 is the quietest and 255 is the loudest sound measurement it can make.
  • The code uses a forever loop to keep the microphone measuring sound levels and plotting a bar graph on the LED display.
  • The louder the sounds measured, the higher the bar graph gets.

준비물

  • new micro:bit with sound (or MakeCode simulator)
  • MakeCode 또는 Python 편집기
  • AAA 배터리 팩 (옵션)

2단계: 프로그래밍 해보세요.

3단계: 더 좋게 만들어 보세요.

  • Create your own ways of displaying how loud a sound is, for example showing different emojis depending on how loud it is
  • Make a visual noise alarm that only flashes when the sound goes over a certain level - you could use this to help keep your classroom peaceful