감추기
MCU상반기결산
홈 > 마이크로비트 > 모듈/센서

마이크로비트 온도/조도/음량 센서보드 Sensor for micro:bit [MNK00062]
마이크로비트용 아날로그 소리센서, 음량센서, 온도센서, 조도센서 통합 보드 / 마이크로비트의 P0, P1, P2와 악어클립 케이블로 간단 연결 / LED 전원 인디케이터 내장
판매가격 : 12,100
적립금 :121
상품상태 :신상품
배송방법 :택배
배송지역 :전국
제조사 :Pimoroni
출시일 :2018-02-07
구매수량 :
총 금액 :
MCU이용 꿀팁

27,600원
12,100원
16,500원
10,780원
상세정보 배송/취소/교환안내 이용후기 상품Q&A
마이크로비트 온도/조도/음량 센서보드 Sensor for micro:bit [MNK00062]

Features

  • 3V and GND connections can be made from either side and allow you to power a second board such as the MonkMakes Relay Board or MonkMakes Speaker.
  • LED ‘power on’ indicator
  • Reverse polarity protection
  • All three sensors are analog and can be connected to pins P0, P1 and P2 using alligator clips.

 

Getting Started

Connecting to your micro:bit

You only have to wire up the sensors that you are actually using, but you could wire all the sensors up as shown below. The code examples below assume that pin 0 is used for sound, pin 1 for temperature and pin 2 for light. You can use any pin for any of the sensors, but remember to modify the code to match the pin you are using.

 

Sound

The Sensor for micro:bit uses a MEMs (microphone on a chip) and a pre-amplifier. The output of the sound sensor is connected to an analog input where it can be sampled. The sound signal varies about the 1.5V level. So, silence will produce an analog output of around 1.5V. When there is sound the analog readings will oscillate above and below the 1.5V level like this:

This is why 511 is subtracted from the readings in the code examples below.

JavaScript Blocks Editor

Here is an example of using the Sensor Board to display a bargraph to indicate the sound level. Click on the image below to try it out. Making a noise into the microphone will make the LEDs dance.

MicroPython

from microbit import *

def bargraph(a):
display.clear()
for y in range(0, 5):
if a > y:
for x in range(0, 5):
display.set_pixel(x, 4-y, 9)

while True:
sound_level = (pin0.read_analog() - 511) / 100
bargraph(sound_level)

 

Temperature

The Sensor for micro:bit uses a thermistor to measure temperature. The temperature output from the board is a voltage that indicates the temperature. This is then measured using an analog input on the micro:bit.

The calculations for converting this voltage reading to an actual temperature are quite complicated and so the code examples here will only give a rough idea of temperature.

If you want your temperatures in Fahrenheit, then multiply the temperature in degrees C by 9, divide the result by 5 and then add 32.

JAVASCRIPT BLOCKS EDITOR

This is an example of using the Sensor Board to display the temperature, try putting your finger on the temperature sensor to warm it up. You can run the example below by clicking on it.

 

MicroPython

from microbit import *

while True:
reading = pin1.read_analog()
temp_c = int(reading / 13.33 - 14)
display.scroll(str(temp_c))
sleep(500)

 

Light

The light sensor uses a phototransistor to measure the light level and produces an output voltage that increases as the light level increases. Here is a guide to the kind of light level you might get from the sensor under different conditions (0 to 1023).

  • Dark 0 to 3
  • Dimly lit room 6 to 10
  • Indoors directly under a light 10 to 50
  • Outdoors (dull day) 100 to 200
  • Outdoors (sunny day) 800 to 900

Even though the maximum analog read value is 1023, the maximum reading from this sensor is around 900.

JAVASCRIPT BLOCKS EDITOR

Here is an example of using the Sensor Board to display a bargraph to indicate the light level. Click on the image below to try it out. Put your finger over the light sensor to make it dark or shine a flash-light onto it to make more LEDs light up.

MicroPython

from microbit import *

def bargraph(a):
display.clear()
for y in range(0, 5):
if a > y:
for x in range(0, 5):
display.set_pixel(x, 4-y, 9)

while True:
light_level = pin2.read_analog() / 10
bargraph(light_level)

※ 공급 제조사는 재고 사정에 따라 동일 사양의 대체상품으로 공급될 수 있습니다.
※ 상기 제품에 첨부된 데이타시트는 참고사항입니다.데이타시트에 표기된 내용에 대하여 본사는 어떠한 기술적인 문의 및 발생하는 문제에 대한 법적인 책임을 지지는 않습니다. 
※ 사용자께서는 사용 전 반드시 제품에 대한 테스트 및 확인 절차 후 사용하시기 바랍니다

상세정보 배송/취소/교환안내 이용후기 상품Q&A