Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Conversation

@gijsio
Copy link
Contributor

@gijsio gijsio commented Apr 23, 2021

No description provided.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@gijsio
Copy link
Contributor Author

gijsio commented Apr 23, 2021

Adding to the description in #95, the branch includes 2 new API calls to enable / disable the internal heating element of the temperature sensor (SI7006A20). This can be used to temporarily heat up the sensor in order to remove any condensation and can be used as follows:

# py = Pycoproc
si = SI7006A20(py)
si.heater_control(False) # disable heater
time.sleep(10)
print(si.temperature()) # returns ~20*C
si.write_heater_reg(15) # set maximum heater current
si.heater_control(True) # enable heater
time.sleep(10)
print(si.temperature()) # returns ~45*C
si.write_heater_reg(1) # set low heater current
time.sleep(10)
print(si.temperature()) # returns ~30*C

Another API call for the light sensor (LTR329ALS01) is the calculation of illuminance in lux, implemented according to Appendix A of the datasheet (not publically available)

# py = Pycoproc
lt = LTR329ALS01(py)
print("Light (channel Blue lux, channel Red lux): " + str(lt.light()), str(lt.lux()))

@gijsio gijsio closed this Apr 23, 2021
@gijsio gijsio deleted the sensor-fixes branch April 23, 2021 12:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants