Martha MigliacioAlex Wong
Published © GPL3+

Using the Pmod HYGRO with Arduino Uno

Application notes for Pmod HYGRO and Arduino Uno. In this app, temperature and humidity values will be displayed on the serial monitor.

BeginnerShowcase (no instructions)1 hour579
Using the Pmod HYGRO with Arduino Uno

Things used in this project

Hardware components

Digilent Pmod HYGRO
×1
Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Code

Pmod HYGRO and Arduino Uno Code

Arduino
Using this code will show the temperature and humidity values on the serial monitor.
/************************************************************************
*
* Test of Pmod HYGRO
*
*************************************************************************
* Description: Pmod_HYGRO
* The temperature and humidity values are displayed
* On the serial monitor.
*
* Material
* 1. Arduino Uno
* 2. Pmod HYGRO (dowload library
* https://github.com/closedcube/ClosedCube_HDC1080_Arduino)
*
* Wiring
* Module<----------> Arduino
* J1 broche 6 5 V
* J1 broche 5 GND
* J1 broche 4 A5
* J1 broche 2 A4
*
************************************************************************/
// Call of libraries
#include <SPI.h>
#include "ClosedCube_HDC1080.h"

ClosedCube_HDC1080 hdc1080; // Creation of the object

void setup()
{
 Serial.begin(9600); // initialization of serial communication
 hdc1080.begin(0x40); // initialization of the sensor
}

void loop()
{
 Serial.print("Temperature en C = ");
 Serial.println(hdc1080.readTemperature()); // Acquisition of temperature
 Serial.print("Humidite en % = ");
 Serial.println(hdc1080.readHumidity()); // aAcquisition of humidity
 delay(1000);
}

Credits

Martha Migliacio

Martha Migliacio

5 projects • 7 followers
Alex Wong

Alex Wong

5 projects • 19 followers
I work in Digilent and like creating projects
Thanks to Lextronics.

Comments

Add projectSign up / Login