HDC1008 Sensor Setup

HDC1008 Humidity & Temperature Sensor Test Setup

This is a Texas Instruments sensor, that came to me via AdaFruit on an i2c breakout board, pictured above.  In the photo, the sensor is the tiny black square in the middle, so as you can barely see, we need it on a breakout board to work with it.  In this case that board provides an i2c interface.  Still can't work with that so we use the Diolan adapter to bridge from I2C to USB on test system.


USB cable to connect Diolan to test system
Diolan-2 adapter board: I2C-->USB
Diolan cables with clips and crocodile attached sensor to breakout board
HDC1008 Sensor on I2C breakout board

Connect it all like this.  The breakout board is clearly labelled as are the Diolan cables.


Diolan Driver - Built that into the kernel, rather than as a module since I shouldn't need to modify/reload it.  Need to include config I2C_DLN2 and it depends on MFD_DLN2

HDC1008 Driver - uses the hdc100x driver drivers/iio/humidity).  Built as a module to load/modify/reload easily.  Need to include HDC100X and it depends on I2C


Rebuild kernel with Diolan built in and hdc100x as a module. Reboot.

Plug USB cable to PC:

Instantiate the sensor as an i2c device:

This sensor address is 0x40, the default address for the HDC1008.   Your driver module will automatically load when the device is instantiated, if not already loaded.

Read the kernel doc on Instantiating i2c Devices.

View the devices sysfs entries:

A Demo:  

Here are the bash scripts used in the demo above:



Labels: , , , ,