KY-001 Temperature sensor module
KY-001 Temperature sensor module
Contents 1 Picture . 1 2 Technical Data / Short description . . . . 1 3 Pinout . . . 2 4 Code example Arduino . . 2 5 One-Wire configuration for Raspberry Pi . . . . 3 6 Code example Raspberry Pi . . . . 3
Picture
Technical Data / Short description
Chip: DS18B20 | Communication protocol: 1-Wire 9- 12Bit precise temperature measurment between –55°C and +125°C
Export: 16. 06. 2017
Copyright by Joy-IT - Published under CC BY-NC-SA 3. 0
Page 11 of 214
KY-001 Temperature sensor module
Pinout
Code example Arduino
You need 2 additional libraries for the following example: - [OneWire Library] from Paul Stoffregen | published under the MIT license. - [Dallas Temperature Control Library] from Miles Burton | published under LGPL Both libraries are part of the package and needs to be copied into the "Library" folder before starting the Arduino IDE. You can find the path at C:\user\[username]\documents\Arduino\libraries by default.
// import needed libraries #include h> #include h> // Declaration of the input pin which is connected with the sensor module #define KY001_Signal_PIN 4 // libraries configuration On...