SENSOR FOR MICRO BIT




The MonkMakes Sensor Board for micro:bit allows you to sense sound level, temperature and light level.

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.

SENSOR FOR MICRO BIT

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.

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.

READ  Forlinx OK5718-C comes with PRU Technology

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.

Read More: SENSOR FOR MICRO BIT




Leave a Comment

*
= 3 + 6

Read previous post:
RESEARCHERS DEVELOPED NEW EFFICIENT, THIN, AND FLEXIBLE COOLING DEVICE
RESEARCHERS DEVELOPED NEW EFFICIENT, THIN, AND FLEXIBLE COOLING DEVICE

Engineers and scientists from the UCLA Henry Samueli School of Engineering and Applied Science and SRI International, California, have created a thin flexible...

Close
Scroll to top