Arduino HDC1080 Library compatibility

Status
Not open for further replies.

ElkinDiaz

Member
Dear Teensy Community,

I would like to use a humidity&temperature sensor which is controlled or acquired by i2c bus. I am trying to use the Arduino library in order to access to the sensor data.

What do you recommend me to do if I found that examples don't work properly? Should I modify the libraries?

How is it possible to adjust an existing arduino compatible library with Teensy 3.2?

Thanks,
 
What do you recommend me to do if I found that examples don't work properly? Should I modify the libraries?

If you can't solve it, of course post a question here. Please notice the "Forum Rule" in red at the top of every page. Questions about problems are expected to have the complete code and all details (like the exact part you are really using) to reproduce the problem. Usually a photo of how you really connected the wires is also useful, since most libraries work and problem are often simple misunderstanding about how to connect the signals or power.

How is it possible to adjust an existing arduino compatible library with Teensy 3.2?

Yes, but the details are important. That's why we have the Forum Rule.

However, nearly all libraries "just work", especially libs from Adafruit. Your easiest path is usually to buy one of their sensors. They also see Teensy, so you can get everything from one site.
 
Note, if you are using i2c on the Teensy, you may need to add pull-up resistors between the two i2c pins (pins 18 and 19) and 3.3v (one resistor between pin 18 and 3.3v, and one resistor between pin 19 and 3.3v). Some i2c devices already have pull-up resistors, some do not. If you connect the device and run the i2cscanner example program, and it hangs, it means you need the pull-up resistors.

Generally 2.2K resistors are recommended for 3.3v applications like the Teensy. You can use the 4.7K resistors that 5v Arduino applications use, but it might prevent you from raising the speed on the i2c bus (ditto for having multiple pull-up resistors). The default i2c bus is fine with 4.7K resistors.

I don't think it is an issue with Adafruit any more since a lot of their new designs are 3.3v chips, but really old i2c devices might be 5v only. That requires using a level shifter to convert between 3.3v and 5v. Generally, it is better to buy i2c devices that can work at either 3.3v or 5v.
 
you might try running the scanner example from the i2c_t3 lib and see if you see your device
 
I wrote my own functions to read and it worked, so I did not need to use the HDC library and it works perfect.

Thanks for the support.
 
Status
Not open for further replies.
Back
Top