Skip to content

Feature request: readRaw() #40

@oschade

Description

@oschade

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions