rleonardi
Posts: 30
Joined: Fri Oct 16, 2015 1:37 pm

1-Wire: writing to w1_slave?

Mon Jul 10, 2017 5:52 pm

Dear all,
I'm succesfully reading DS18B20 temperature by applying open() and read() functions to the corresponding /sys/devices/w1_bus_master1/<unique identifier>/w1_slave file.
QUESTION: Is it possible to change the resolution, ie. to act on the scratchpad of the sensor, by using write() on the same file? Currently the only way I found to write to the sensor is to access directly the GPIO by using mmap.
Thank you very much.
Ciao

Return to “Interfacing (DSI, CSI, I2C, etc.)”