1
Discussion - Software / Reading Temp/Hum from an SHT31-D on Linux via an FT232H interface
« on: August 19, 2019, 07:05:25 pm »
Hi.
I have an Adafruit FT232H board with a connected SHT31-D that I want to read the humidity and temperature from. I want to code this in C++ and not Python and I was wondering if anyone had a simple shell of a C or C++ program that would just show the basics of doing that. I have FTD2XX and libMPSSE-i2c libraries installed on Ubuntu 19.04 release.
I can see the FT232H and read its EEPROM. I know that I have to remove the ftdi_sio and usbserial drivers to be able to talk to it. Where I don't have any practical experience is talking through the FT232H to the SHT31-D using either D2XX or MPSSE with i2c or other protocols.
The SHT31-D is wired with ground, D0 to SCL and D1 tied to D2 going to SDA. I have python code that can read the temp and humidity but I just can't seem to compile a C or C++ program with the right library combinations to be able to make it work.
Any help or pointers would be appreciated.
P.S. I have the following reply from support on the Adafruit support group:
"by adafruit_support_mike on Mon Aug 19, 2019 5:40 am
I'm afraid we don't have any C code for communicating with the FT232H. Maybe someone from the community will have more information."
Regards,
Dan
I have an Adafruit FT232H board with a connected SHT31-D that I want to read the humidity and temperature from. I want to code this in C++ and not Python and I was wondering if anyone had a simple shell of a C or C++ program that would just show the basics of doing that. I have FTD2XX and libMPSSE-i2c libraries installed on Ubuntu 19.04 release.
I can see the FT232H and read its EEPROM. I know that I have to remove the ftdi_sio and usbserial drivers to be able to talk to it. Where I don't have any practical experience is talking through the FT232H to the SHT31-D using either D2XX or MPSSE with i2c or other protocols.
The SHT31-D is wired with ground, D0 to SCL and D1 tied to D2 going to SDA. I have python code that can read the temp and humidity but I just can't seem to compile a C or C++ program with the right library combinations to be able to make it work.
Any help or pointers would be appreciated.
P.S. I have the following reply from support on the Adafruit support group:
"by adafruit_support_mike on Mon Aug 19, 2019 5:40 am
I'm afraid we don't have any C code for communicating with the FT232H. Maybe someone from the community will have more information."
Regards,
Dan