HTU21D connection to STM32 (HAL): temperature and humidity sensor (SUB)

Поделиться
HTML-код
  • Опубликовано: 9 ноя 2024
  • Article (RU): cxemka.com/46-...
    Buy HTU21D on Aliexpress (1.37$): ali.ski/rP0qGH
    Buy HTU21D on Aliexpress (1.35$): ali.ski/JTbp6M
    Buy HTU21D on Aliexpress (2.23$): ali.ski/prAxn

Комментарии • 8

  • @toxatt2
    @toxatt2 3 года назад +1

    Как приятно смотреть, что сделано не на абдурино

  • @chengL10
    @chengL10 4 года назад

    Can you do a video about CO2 sensor CCS811 with STM32? I have some problems...

  • @지금이대로좋다-d6c
    @지금이대로좋다-d6c 3 года назад

    Thank you for the good video. I have a question. I don't know why HAL_I2C_Mem_Read doesn't work. Is INTERRUPT necessary? Thank you.

    • @cxemkacom3623
      @cxemkacom3623  3 года назад +1

      After working with this sensor I decided to not to use Mem_Read, because the sensor needs time to take measurements. I recommend to do like this:
      (send_command)-(100 ms delay)-(read data)-(100 ms delay)...
      Here interrupt it's not absolutely necessary.
      CODE EXAMPLE:
      /* Variables for HTU21D (tmp. sensor) */
      uint8_t HTU21D_RX_Data[3];
      float HTU21D_Temperature;
      float HTU21D_Humidity;
      uint16_t HTU21D_ADC_Raw;
      uint8_t HTU21D_Temp_Cmd = 0xE3;
      uint8_t HTU21D_Humi_Cmd = 0xE5;
      #define HTU21D_ADRESS (0x40

    • @지금이대로좋다-d6c
      @지금이대로좋다-d6c 3 года назад

      @@cxemkacom3623 Thank you for your confirmation.
      (HAL_I2C_Mem_Read) tried to add 100ms latency, but it did not work.
      I don't think I understand the datasheet yet.
      I'll try to activate the code you told me.
      I appreciate your pointing it out to us.

  • @ВладимирТанких-й2с
    @ВладимирТанких-й2с 4 года назад

    Лучше все делать в варижках

  • @vasiavitin3548
    @vasiavitin3548 Год назад

    Не работает ... ни в какую ... уже код с гитхаба взял ... всё равно не пашет!