You can set any I2C address by connecting just one sensor (one after the other) to the Arduino, power it with a digital I/O (the power up delay the Arduino is waiting for a new sketch upload is to long to set the device to command mode) and send it the necessary I2C commands to change the address. After that change the device listens to the newly configured slave address.
The I2C address is configured in register 0x1C in bits 0 to 6.
After having done this configuration you can use the sensor just as any other I2C device with the individually configured bus address.
Just out of curiosity: Why do you want to connect 3 of these sensors to one Arduino? Do you have 3 areas of different humidity all in the 50cm range of a single I2C bus?
The problem that I have is that the wiring diagrams are not very readable on the page. They cannot be magnified.
I would like to apply this instruction to my Arduino Micro Pro and the HIH6130 sensor that is soldered onto a PCB with some components (capacitors that are on the diagram are probably already there)
The device is programmed through the power pin?
This is why they suggest the use of a voltage regulator. What kind of voltage regulator would not interfere with the programming process? Would LM2950-3.3 or LM3940 work? Can I get away with LM317 and an appropriate voltage divider for the voltage setting?
Not, but to enter the command mode you have to send some I2C messages in a short window after powering the chip. Because the Arduino waits for some time to receive a new sketch after powering it up, you cannot connect the chip to the same power as the Arduino but you must power the chip using a digital I/O of the Arduino. Because the HIH-6130 consumes less than 1mA that's no problem.
This is why they suggest the use of a voltage regulator.
As knut_ny already wrote, a voltage regulator is not necessary, the chip is fine with the 5V of the Arduino.
So connect it to you Micro Pro this way:
Arduino HIH-6130
D2 SDA
D3 SCL
D4 VDD
GND GND
If connected this way the constructor of the library has to be called like this:
Got the result from the sensor tester
35.95 -38.66
Humidity and temperature?
I still have the protective sticker on the sensor, why temperature is negative?
3 sensors that I bought give the same temperature output when I plugged them into the circuit.
(Currently they have the same address. The goal is to give them 3 different addresses and to use them simultaneously.)
/*
Example showing how to use the HIH6130 library for Arduino
Tested on the Arduino Uno R3 with Arduino v1.0.6 installed
Written by David Hagan, December 2, 2014
*/
#include <Wire.h>
#include <HIH6130.h>
// Define the address used by the HIH6130
byte address = 0x27;
HIH6130 rht(address);
void setup(){
Serial.begin(9600);
rht.begin();
Serial.println("RH (%)\tT (C)");
}
void loop(){
// Read data
rht.readRHT();
// Print the data
Serial.print(rht.humidity); Serial.print("\t");
Serial.println(rht.temperature);
delay(2000);
}
I STILL DONT UNDERSTAND WHY SO MANY EXAMPLES GIVE ME SYNTAX ERRORS
I FEEL LIKE THERE ARE SEVERAL DIFFERENT LIBRARIES THAT SHARE THE SAME NAME
This is confusing.