AHT10 IC2 RH Temp

Posted on
  • Hey im trying to read the temperature and humidity from the AHT10 and im just stuck. I hook up the SCL an SDA with software ic2 and then i try to read on 0x38 and 0x39, 6 bytes.
    The response is

    These vales doesn't change when i change the temperature. Whats the next thing i could try ?

  • Just looked at the datasheet, but looks like some initialization is needed.
    BTW looks like that guy is doing some serious testing: https://wiki.liutyi.info/download/attach­ments/35291508/Humidity_sensors_board_v7­s1.jpg?version=1&modificationDate=157238­0072453&api=v2 :)

  • Take a look at this GitHub repository for the AHT10 written in C++ which might be a nice starting point for writing you javascript code to get temperature and humidity.

    Give it a try and share what you achieved or where you stuck.

  • Just a note that address 0x38 is almost certainly the right address to do the communications on. If 0x39 is returning 255 it's probably because the AHT10 isn't on that address

  • Well thank you all for your comments, you all made me realize it was doable hehe..
    Here you go

    Maybe i can improve some stuff, like could probaly make the user send in the i2c instance so it can be used with other devices on the same pins ?

  • Cool, that was quick, thanks for sharing.

  • Thanks! http://www.espruino.com/AHT10

    Yes, I think in general sending in the I2C instance is better - if only because that's what everything else does

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

AHT10 IC2 RH Temp

Posted by Avatar for Gustav @Gustav