drivers/ds18: Add Maxim Integrated ds18 driver#6512
drivers/ds18: Add Maxim Integrated ds18 driver#6512phectori wants to merge 2 commits intoRIOT-OS:masterfrom
Conversation
aabadie
left a comment
There was a problem hiding this comment.
Changes looks good in general. I just have a few minor comments.
Will test on the sensor I have.
Thanks for proposing this PR btw :)
drivers/ds18/ds18.c
Outdated
|
|
||
| #include "log.h" | ||
| #include "periph/gpio.h" | ||
| #include "timex.h" |
drivers/include/ds18.h
Outdated
| /** | ||
| * @brief export SAUL endpoint | ||
| */ | ||
| extern const saul_driver_t ds18_temperature_saul_driver; |
drivers/include/ds18.h
Outdated
| #define DS18_TEMP_H | ||
|
|
||
| #include "periph/gpio.h" | ||
| #include "saul.h" |
|
Just noticed that an application for this is missing in the tests. |
|
Tested ds18b20 an on arduino-zero with pin 12 (PA, 19) but the sensor returns incorrect values (163.77°C, this is not good, trust me ;) ). On which board did you try ? |
|
ping @phectori, any chance for an update ? |
|
@aabadie Yes. I have tested the driver on an Arduino and got the same result as you. Haven't had the time to figure out why yet. I tested the driver on a nucleo board before. Regarding the test; Is a SAUL test (using something like: |
|
Removed the unnecessary includes/code you pointed out before and rebased. |
|
ping @phectori, any progress on your side ? |
|
@phectori still no progress on your side ? |
|
Closed due to inactivity of author, |
@aabadie I think I found the problem. Apparently the time measurement on the If it's ok I will take over this PR and write the missing test application. |
Yes please! Good luck with writing the test application. |
This patch adds the driver for the Maxim Integrated ds1822 and ds18b20 temperature sensors. These sensors use one-wire as communication protocol and can be powered using the data-line.
Currently I have only tested the ds1822, but according to the datasheet they should be software compatible.
The driver is SAUL compatible.