First steps: Sensors

First steps: Sensors

Measure temperature, light and orientation

Easy

15 mins

from 8 years on

In this lesson we’ll be using the editor from Open Roberta. Be careful to ensure that the following image is visible at the top right of your programming environment. You can find the editor on our website. Just click on ‘Let’s Start’ and then ‘Editor’.

First steps: Sensors

The Calliope Mini is equipped with a number of sensors: It has a Temperature sensor, a light sensor, a compass as well as a microphone.

1Displaying sensor data

In order to display data from your sensors on the Calliope mini’s LED matrix, go to the Sensors menu and connect the corresponding block to the Display Text block.

2Temperature sensor

The Temperature sensor gives you the current temperature in Celsius.

3Light sensor

The Calliope mini can use its LEDs to measure brightness. You will be given a value between 0 and 255 where 0 is total darkness and 255 equates to a very bright light.

4Compass

The built in magnetometer allows the Calliope mini to tell in which direction it is facing. This sensor will provide a value between 0 and 360 degrees. The compass will need to be calibrated before use. Follow the instructions on the Calliope mini and tilt it in a circular fashion to display a complete circle.

5Microphone

The microphone can be used to determine how much noise there is as a percentage (0-100).