-
Notifications
You must be signed in to change notification settings - Fork 2.1k
drivers/ds18: Add Maxim Integrated ds18 driver #6512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include not needed
drivers/include/ds18.h
Outdated
/** | ||
* @brief export SAUL endpoint | ||
*/ | ||
extern const saul_driver_t ds18_temperature_saul_driver; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed
drivers/include/ds18.h
Outdated
#define DS18_TEMP_H | ||
|
||
#include "periph/gpio.h" | ||
#include "saul.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include not required
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.