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

Feature request: readRaw() #40

Open
oschade opened this issue Jan 4, 2020 · 0 comments
Open

Feature request: readRaw() #40

oschade opened this issue Jan 4, 2020 · 0 comments

Comments

@oschade
Copy link

oschade commented Jan 4, 2020

Thank you for your great library!
I want to read the whole scratchpad from an OneWire sensor, for example:

con.read("/28.0000B218DA00/scratchpad", function(err, result){
  console.log( result )
})

Sadly, your library converts every payload to an utf8-String. Because the scratchpad of the sensor is no valid utf-8 string, some bytes get lost and there is no way to get them back.
It would be great if there is a function like "readRaw", which bypassed every string conversion in the code.

Background:
I simulate a DS18B20 with an arduino and the library "OneWireHub" and modify some bytes to get a higher resolution. To get this modifed bytes, I need to read the full "scratchpad".

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

1 participant