# DS18B20_CC2652RB **Repository Path**: ShadowThreeD/ds18b20-cc2652rb ## Basic Information - **Project Name**: DS18B20_CC2652RB - **Description**: 移植`https://github.com/matmunk/DS18B20`到`CC2652RB`平台。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-04-07 - **Last Updated**: 2022-06-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## DS18B20_CC2652RB ## 说明 1. 这个仓库有两个分支: - master : 默认分支,每次都是通过枚举`DS18B20`设备采集温度,所以支持`DS18B20`热拔插。 - getTemp_by_ID : 上电后只枚举一次总线上的设备并保存设备`ID`,然后每次都按已有的设备`ID`读取温度。 2. 在`master`分支中,以下代码只是为了将`7`个`DS18B20`传感器的温度按一定顺序打印。如果不需要,可以将其删除;若传感器数量不对或想要的顺序和`numberNo`指定的不一样,请自行修改。 ```c #define NUM_DS 7 static float temp[NUM_DS] = {0}; const uint8_t numberNo[NUM_DS] = {3, 1, 0, 5, 6, 2, 4}; ``` 3. clone getTemp_by_ID branch ```bash git clone --branch=getTemp_by_ID git@git.com:ShadowThreeD/ds18b20-cc2652rb.git ```