Skip to content
Additional Module for MagicMirror² the temperature and humidity from the sensor HDC1080 on the MagicMirror²
JavaScript C
Branch: master
Clone or download
MichaelF1 Update
corrected filename of c program
Latest commit e136c2a May 19, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
MMM-HDC1080.js Add files via upload Aug 28, 2017 Update May 19, 2018
ReadHDC1080 Add files via upload Aug 28, 2017
ReadHDC1080_Pi.c Add files via upload Aug 28, 2017
node_helper.js Add files via upload Aug 29, 2017
npm-debug.log Add files via upload Aug 28, 2017


This module shows the temperature and humidity of a HDC1080 Sensor by using the I2C of the RaspberryPi and displays it at your MagicMirror² The Pins 2 and 3 are used for I2C and can not be changed. The main function and code is from @Bangee44 ( where he used it for a DHT22-Sensor.



Navigate into your MagicMirror's modules folder:

cd ~/MagicMirror/modules

Clone this repository:

git clone

Setup the address (default is 0x40) of your used I2C - HDC1080 Sensor in the ReadHDC1080.c-file at ~/MagicMirror/modules/MMM-HDC1080/:

int iI2cAddress = 0x40; //put in your I2C-Address here

If you do not need to change the file you are fine now, but if you have to you have to compile it with:

cc -Wall ReadHDC1080_Pi.c -o ReadHDC1080 -lwiringPi

Navigate to the new MMM-HDC1080 folder and make ReadHDC1080 executable.

cd MMM-HDC1080
chmod 755 ReadHDC1080

You can change the ReadHDC1080.c file for your own needs if you like to. You'll have to recompile it using wirinpi lib.

cc -Wall ReadHDC1080.c -o ReadHDC1080 -lwiringPi

Configure the module in your config.js file.

Using the module

To use this module, add it to the modules array in the config/config.js file:

modules: [
    module: 'MMM-HDC1080',
    position: 'top_right',
    config: {
            updateInterval: 0.5, // Minutes    

Configuration options

The configuration options are still the same of

The following properties can be configured:

Option Description
updateInterval Updateinterval for HDC1080 sensor in minutes
Possible values: int
Default value: 0.5

You can’t perform that action at this time.