/********************************************************************************* * Copyright: (C) 2023 LingYun IoT System Studio * All rights reserved. * * Filename: sht20.c * Description: This file is temperature and relative humidity sensor SHT20 code * * Version: 1.0.0(10/08/23) * Author: Guo Wenxue * ChangeLog: 1, Release initial version on "10/08/23 17:52:00" * * Pin connection: * STH20 Module Raspberry Pi Board * VCC <-----> #Pin1(3.3V) * SDA <-----> #Pin3(SDA, BCM GPIO2) * SCL <-----> #Pin5(SCL, BCM GPIO3) * GND <-----> GND * * /boot/config.txt: * dtoverlay=i2c1,pins_2_3 * ********************************************************************************/ #ifndef _SHT20_H_ #define _SHT20_H_ #define SHT20_I2CDEV "/dev/i2c-1" #define SHT20_I2CADDR 0x40 extern int sht2x_get_temp_humidity(float *temp, float *rh); #endif /* ----- #ifndef _SHT20_H_ ----- */