Skip to content
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

max31865:RTD-to-Digital Converter #10864

Merged
merged 1 commit into from Oct 6, 2023
Merged

Conversation

laoniaokkk
Copy link
Contributor

Summary

A digital converter for rtd

Impact

NuttShell (NSH) NuttX-12.2.1
nsh>
nsh> ls /dev
/dev:
console
null
ram0
temp0
ttyS0

Testing

#define MAX31865_PATH "/dev/temp0"

int main(int argc, FAR char *argv[])
{
int ret = 0;
int fd = 0;
float temp = 0.0f;

fd = open(MAX31865_PATH, O_RDONLY);
if (fd < 0)
{
perror("open max31865 fail");
return -1;
}

while (1)
{
sleep(1);
ret = read(fd, (float *)&temp, sizeof(temp));
if (ret < 0)
printf("read max31865 fail: %d\n", ret);
else
printf("temp: %.1f\n", temp);
}

return 0;
}

@xiaoxiang781216 xiaoxiang781216 merged commit aec0271 into apache:master Oct 6, 2023
26 checks passed
@jerpelea jerpelea added this to To-Add in Release Notes - 12.4.0 Dec 27, 2023
@jerpelea jerpelea moved this from To-Add to processed in Release Notes - 12.4.0 Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants