# Send temperature **Repository Path**: wyj98/Send-temperature ## Basic Information - **Project Name**: Send temperature - **Description**: 树莓派上通过1-Wire协议连接DS18B20温度传感器,每隔30秒采样上报给服务器程序,服务器在收到来自各个客户端的数据之后保存到数据库之中 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-03-01 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Send temperature #### Description 树莓派上连接DS18B20温度传感器,每隔30秒采样上报给服务器程序,服务器在收到来自各个客户端的数据之后保存到数据库之中 #### Software Architecture 客户端需要连接有DS18B20温度传感器的树莓派,服务器需要下载有sqlite3数据库 #### Installation 客户端在连接有DS18B20温度传感器的树莓派安装,在client/文件夹下输入命令: make 安装好后在client/文件夹下输入命令使用: ./Sendtemper_client Sendtemper_client -- (2019.1.21) Usage: Sendtemper_client -i / -p [-h ] -p --port the port of the server you want to connect -i --ip the ip address or hostname of the server you want to connect -h --help the client file how to use -d --daemon the client progame running in backgruand 服务器在安装有sqlite3的linux操作系统,在server/文件夹下输入命令: make 服务器安装 ![输入图片说明](https://images.gitee.com/uploads/images/2019/0716/173405_16741bb2_2171782.png "屏幕截图.png") 客户端安装 ![输入图片说明](https://images.gitee.com/uploads/images/2019/0716/173734_2edf43db_2171782.png "屏幕截图.png") 安装好后在server/文件夹下输入命令使用: ./Rectemper_server Rectemper_server -- (2019.1.22) Usage: Rectemper_server -p [-h ] -p --port the server listen port -h --help the server file how to use -d --daemon the server progame running in backgruand ![输入图片说明](https://images.gitee.com/uploads/images/2019/0716/173923_f815bc9b_2171782.png "屏幕截图.png") 客户端向服务器发送温度 ![客户端发送温度](https://images.gitee.com/uploads/images/2019/0716/174002_25244766_2171782.png "屏幕截图.png") 服务器将温度保存到数据库中 ![服务器将温度保存到数据库中](https://images.gitee.com/uploads/images/2019/0716/174052_c0ebc55a_2171782.png "屏幕截图.png") 查看数据库 ![查看数据库](https://images.gitee.com/uploads/images/2019/0716/174248_9f32e8a9_2171782.png "屏幕截图.png") #### Remove 在对应的文件夹下面输入命令: make clean