RaspberrPi project source code
guowenxue
2024-03-14 b3dc672c57aa5374fcd1ba1da5321d6c63d68e0f
commit | author | age
d6b4a7 1 /*********************************************************************************
G 2  *      Copyright:  (C) 2023 LingYun IoT System Studio
3  *                  All rights reserved.
4  *
5  *       Filename:  ds18b20.h
6  *    Description:  This file is temperature sensor DS18B20 code
7  *
8  *        Version:  1.0.0(2023/8/10)
9  *         Author:  Guo Wenxue <guowenxue@gmail.com>
10  *      ChangeLog:  1, Release initial version on "2023/8/10 12:13:26"
11  *
12  * Pin connection:
13  *
14  *               DS18B20 Module          Raspberry Pi Board
15  *                   VCC      <----->      #Pin1(3.3V)
16  *                   DQ       <----->      #Pin7(BCM GPIO4)
17  *                   GND      <----->      GND
18  *
19  * /boot/config.txt:
20  *
21  *          dtoverlay=w1-gpio-pullup,gpiopin=4
22  *
23  ********************************************************************************/
24
25 #ifndef  _DS18B20_H_
26 #define  _DS18B20_H_
27
28 extern int ds18b20_get_temperature(float *temp);
29
30 #endif   /* ----- #ifndef _DS18B20_H_  ----- */
31