MicroPython HS3003 Driver¶
hs3003
¶
MicroPython Driver for the Renesas HS3003 Temperature and Humidity Sensor
Author(s): Jose D. Montoya
-
class micropython_hs3003.hs3003.HS3003(i2c, address: int =
0x44
)[source]¶ Driver for the HS3003 Sensor connected over I2C. Resolution can be configured, however this is not implemented in this library, as is required to send commands after power up, to put the sensor in programming mode
- Parameters:¶
Quickstart: Importing and using the device
Here is an example of using the
HS3003
class. First you will need to import the libraries to use the sensorfrom machine import Pin, I2C from micropython_hs3003 import hs3003
Once this is done you can define your
machine.I2C
object and define your sensor objecti2c = I2C(1, sda=Pin(2), scl=Pin(3)) hs = hs3003.HS3003(i2c)
Now you have access to the attributes
temp = hs.temperature humidity = hs.relative_humidity