Include 1-Wire sensor example for DS18B20#4894
Conversation
Added example code for Dallas/Maxim DS18B20 sensor using 1-Wire protocol.
|
Thank you for raising your pull request and contributing to our Community |
🌍 检测到文档变更 - 可进行多语言翻译统计信息: 共 1 个文件需要处理 🚀 开始翻译在此评论回复以下命令之一:
|
🌍 检测到文档变更 - 可进行多语言翻译统计信息: 共 1 个文件需要处理 🚀 开始翻译在此评论回复以下命令之一:
|
|
Hi @WeSpeakEnglish, thank you for contributing this 1-Wire DS18B20 example! The code is clean and well-structured. Here are a few suggestions to make it even better for wiki readers: 1. Add wiring instructionsThe example jumps straight into code without explaining the hardware setup. DS18B20 requires a 4.7kΩ pull-up resistor between the data line and VCC. Could you add a brief wiring description, e.g.:
2. Clarify the pin mappingThe code uses 3. Parasitic power noteThe code uses parasitic power mode ( 4. Multi-device limitationThe example uses Read ROM ( 5. Suggested library alternativesFor users who want a quicker start, you could mention existing Arduino libraries:
These are all optional improvements. The code itself works correctly — nice CRC implementation and clean serial output. Let us know if you'd like to address any of these or if you prefer to merge as-is! |
Added example code for Dallas/Maxim DS18B20 sensor using 1-Wire protocol.