Page 97 - Robo_Genius_V1.0_flipbook_C5
P. 97
2. Programming Conditional Responses: You will explore how to program the
micro:bit to respond differently based on which button or input is touched.
They will use conditional statements (“if A is pressed, display a heart”),
reinforcing the concept of programming logic and decision-making processes
in code.
Observations
In the Programming a Touch Heart with Micro:bit activity, you will observe how
the micro:bit responds to physical touch. When they press button A or B, or
touch a connected pad, the heart icon appears on the LED grid. This provides
them with practical experience in seeing how input actions (like a touch) can
result in a specific output (the heart icon).
you will also observe how touch sensors work
to detect human interaction and convert that
into a meaningful visual response.
Application
A touch sensor in a mobile phone allows users
to interact with the device by detecting touch
inputs on the screen.
Understanding Temperature Sensor
The Micro:bit is a pocket-sized computer with many input and output devices,
including sensors. One of the built-in sensors is a temperature sensor. This
temperature sensor helps us measure the temperature, which we can then
display on the micro:bit’s screen.
A temperature sensor is an input device that
measures temperature. The micro:bit has a
tiny sensor inside its CPU that works like a
little thermometer. When you write a program,
the sensor checks the air temperature around
it and gives you an approximation of it. It
then sends this information to the micro:bit’s
screen. The screen can show the temperature as a number, like 25 degrees.
Programming with Micro:bit-Based Programming 95

