![Elecrow Crowtail Starter Kit Скачать руководство пользователя страница 33](http://html1.mh-extra.com/html/elecrow/crowtail-starter-kit/crowtail-starter-kit_user-manual_2378765033.webp)
On button pressed:
Start an event handler (part of the program that will run when
something happens, like when a button is pressed). This handler works when button A or B
is pressed, or A and B together. When you are using this function in a web browser, click the
buttons on the screen instead of the ones on the micro:bit. In this experiment, when button
A is pressed, show the temperature on micro:bit’s matrix LEDs; when button B is pressed,
show humidity on micro:bit’s matrix LEDs.
Value of dht11...at pin...:
Use this block in the extension package we added to set the pin
of Crowtail-Temperature&Humidity Sensor and get data from it. Available data includes
Fahrenheit, Celsius and Humidity. In here, we get Celsius and Humidity from the sensor.
Programming and note
To using the Crowtail-Temperature&Humidity Sensor, we need to add the extension package.
Follow the steps below to add extension package:
Step 1
: Click on the Extensions
Step 3
: You will view the search
results andclick on it.
Step 4
: Then you can see the extensions package you added
in Makecode and click to use the DHT11 block.
Step 2
: Enter the address in the search bar and search:
https://github.com/Tinkertanker/pxt-iot-environment-kit
30