2019 views|0 replies

1w

Posts

25

Resources
The OP
 

HTS221 MakeCode extension (driver) [Copy link]

 

The MakeCode extension for the HTS221 temperature and humidity sensor allows you to use the HTS221 in a graphical way. The extension is ported from the MicroPython driver , retaining the oneshot mode and power switch functions, and simplifying them for easier use.

How to use

  1. Connect the sensor's I2C to the micro:bit
  2. Open MakeCode
  3. Select Extensions in the menu, then enter the following extension URL in the address bar.
  4. After searching, click HTS221
  5. Add the HTS221 block to the program and start programming.

Extension URL : https://github.com/makecode-extensions/HTS221

Demo program : https://makecode.microbit.org/_R4T8LUdoa5ea

basic.forever(function () {
    serial.writeValue("T", HTS221.temperature(HTS221.HTS221_T_UNIT.C))
    serial.writeValue("H", HTS221.humidity())
    led.toggle(0, 0)
    basic.pause(1000)
})


This content is originally created by dcexpert , a user of EEWORLD forum. If you want to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source

This post is from MEMS sensors
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list