红外测温gy-906python
时间: 2023-10-12 13:02:54 浏览: 102
你可以使用gy-906传感器来进行红外测温。首先,你需要安装mlx90614库。你可以从Arduino库中下载Adafruit_MLX90614头文件,或者将供应商提供的资料中的文件夹添加到Arduino安装路径的libraries文件夹中。接下来,你可以使用以下代码来获取环境温度和物体温度:
```
from mlx90614 import MLX90614
thermometer_address = 0x5a
thermometer = MLX90614(thermometer_address)
print thermometer.get_amb_temp() # 获取环境温度
print thermometer.get_obj_temp() # 获取物体温度
```
请注意,以上代码是使用Python编程语言编写的。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [python+树莓派+红外测温](https://blog.csdn.net/ycl125525/article/details/121480252)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [2021-03-31](https://blog.csdn.net/TYYYYYYYYYYYT/article/details/115354945)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文