Manages the 1-wire bus
Dependents: oldheating heating
web/web-1wire-class.inc
- Committer:
- andrewboyson
- Date:
- 2020-06-10
- Revision:
- 9:6f663ad53c7e
- Parent:
- 8:ceafef18cbf7
- Child:
- 11:3859fee99d5d
File content as of revision 9:6f663ad53c7e:
"//OneWire script\n" "'use strict';\n" "\n" "class OneWire\n" "{\n" " static DS18B20ToString(value)\n" " {\n" " switch (value)\n" " {\n" " case 0x7FFF: return 'CRC error' ;\n" " case 0x7FFE: return 'ROM not found' ;\n" " case 0x7FFD: return 'Timed out' ;\n" " case 0x7FFC: return 'No device detected after reset';\n" " case 0x7FFB: return 'Device removed during search' ;\n" " }\n" " return (value / 16.0).toFixed(1);\n" " }\n" "}"