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

1-wire support #1543

Open
kwando opened this issue Feb 15, 2025 · 1 comment
Open

1-wire support #1543

kwando opened this issue Feb 15, 2025 · 1 comment

Comments

@kwando
Copy link

kwando commented Feb 15, 2025

Some sensors use the 1-wire protocol, for instance the common temperature sensor ds18b20. Would be great to have a driver for this.
https://en.wikipedia.org/wiki/1-Wire

Do you think an esp32 would be fast enough to do this via the gpio module?

@UncleGrumpy
Copy link
Collaborator

From looking at this ESP-IDF based driver implementation, it looks like 1-wire relies on precise microsecond timing that we could not guarantee for bit-banging from the Erlang GPIO driver:
https://github.com/UncleRus/esp-idf-lib/tree/master/components/onewire

It does look like a fairly easy driver to port to AtomVM. I don’t know if it is popular enough to include in the default image, but an external driver, (especially one based on the component I linked above) should be fairly easy. I have several things I am working on at the moment, or I would tackle this for you right away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants