Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for HTU21D/SHT21 temperature and humidity sensors #2249

Closed
wants to merge 3 commits into from

Conversation

pawel-sw
Copy link

@pawel-sw pawel-sw commented Feb 4, 2018

  • This PR is for the dev branch rather than for master.
  • This PR is compliant with the other contributing guidelines as well (if not, please describe why).
  • I have thoroughly tested my contribution.
  • The code changes are reflected in the documentation at docs/en/*.

HTU21D is cheap digital temperature and humidity sensor.

@pawel-sw pawel-sw changed the title Add support for HTU21D/SHT21 temperature and pressure sensors Add support for HTU21D/SHT21 temperature and humidity sensors Feb 4, 2018
return (uint8_t) remainder;
}

static uint16_t ICACHE_FLASH_ATTR read_with_crc_check(lua_State *L, uint8_t reg)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don;t need the ICACHE_FLASH_ATTR as all nodemcu functions default to flash unless otherwise specified.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you, I've removed the ICACHE_FLASH_ATTR

@devsaurus
Copy link
Member

Please add I2C id as parameter to htu21.read() and check against platform_i2c_exists(). This seems redundant on ESP8266 platform, but helps future compatibility with ESP32.

@HHHartmann
Copy link
Member

Hmm, this PR unfortunately is so old that it does not contain several changes we did. Pity that it wasn't picked up earlier.
Given that we now encourage pure Lua modules over C modules unless there is a reason for C (e.g. timing) this PR should be rewritten in Lua.
Same probably applies to #2261.

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 16, 2022
@stale stale bot closed this Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants