{
    "ok": true,
    "data": {
        "title": "EP-0031",
        "rev_id": 10883,
        "updated_at": "2021-08-27T10:55:31+00:00",
        "chunk_count": 13,
        "chunks": [
            {
                "title": "EP-0031",
                "rev_id": 10883,
                "heading_path": "",
                "chunk_index": 0,
                "content": "# EP-0031\n\n1. Raspberry Pi LM75B Temperature Sensor v1.0  SKU:EP-0031",
                "char_count": 69,
                "token_estimate": 18
            },
            {
                "title": "EP-0031",
                "rev_id": 10883,
                "heading_path": "Product Feature",
                "chunk_index": 1,
                "content": "*9bit high resolution ADC in chip\n*Temperature resolution of 0.125°C.\n*I2C bus plug and play\n*Compatible with all kind of development board.\n----",
                "char_count": 145,
                "token_estimate": 37
            },
            {
                "title": "EP-0031",
                "rev_id": 10883,
                "heading_path": "Compatibility List",
                "chunk_index": 2,
                "content": "- Compatibility\n{| class=\"wikitable\" style=\"text-align: center;\"\n|-\n!Platform !!LM75B temperature Sensor Version 1.0!! Notes\n|-\n|Raspberry Pi 3 Model B Plus|| WIP || WIP: work in process\n|-\n|Raspberry Pi zero || √||\n|-\n| Raspberry Pi zero W  || √||\n|-\n|Raspberry Pi 3 Model B|| √||\n|-\n|Raspberry Pi 2 Model B|| √||\n|-\n|Raspberry Pi Model B+|| √||\n|-\n|}",
                "char_count": 352,
                "token_estimate": 88
            },
            {
                "title": "EP-0031",
                "rev_id": 10883,
                "heading_path": "Port",
                "chunk_index": 3,
                "content": "*Raspberry Pi GPIO pins\n{|-\n|[thumb|left|300px](\/docs\/File:LM75new3.jpg)\n|[thumb|none|px300](\/docs\/File:LM75new2.jpg)\n|}\n<br style=\"clear:both;\" >\n----",
                "char_count": 151,
                "token_estimate": 38
            },
            {
                "title": "EP-0031",
                "rev_id": 10883,
                "heading_path": "Product Parameters",
                "chunk_index": 4,
                "content": "*Working voltage: 1.8V-5.5V, accuracy can be up to 0.5 when working voltage is higher than 3v.\n*Temperatures range from−55°C to +125°C\n*Supply current of 3.5µA in shutdown mode for power conservation\n*Temperature accuracy of: ±2°C from−25°C to +100°C\n*Temperature accuracy of: ±3°C from−55°C to +125°C\n----",
                "char_count": 306,
                "token_estimate": 77
            },
            {
                "title": "EP-0031",
                "rev_id": 10883,
                "heading_path": "Package Include:",
                "chunk_index": 5,
                "content": "- 1 x Raspberry Pi LM75B  Temperature Sensor v1.0\n----",
                "char_count": 54,
                "token_estimate": 14
            },
            {
                "title": "EP-0031",
                "rev_id": 10883,
                "heading_path": "Typical Application",
                "chunk_index": 6,
                "content": "*Industrial controllers\n*Environmental monitoring\n*Smart home\n*Interactive devices\n----",
                "char_count": 87,
                "token_estimate": 22
            },
            {
                "title": "EP-0031",
                "rev_id": 10883,
                "heading_path": "How to wire it up",
                "chunk_index": 7,
                "content": "[thumb|left|300px](\/docs\/File:Lm75new1.jpg)\n<br style=\"clear:both;\" >\n----",
                "char_count": 74,
                "token_estimate": 19
            },
            {
                "title": "EP-0031",
                "rev_id": 10883,
                "heading_path": "How to use it",
                "chunk_index": 8,
                "content": "*i2c-tools package is required, so you should install it before you get temperature as following command:\n\n<code> sudo apt-get update && sudo apt-get  -y install i2c-tools <\/code>\n*Enable I2c function by editing \/boot\/config.txt,make sure it contain this two parameter as following:\n\n<code>device_tree=bcm2710-rpi-3-b.dtb<\/code>\n\n<code>dtparam=i2c_arm=on<\/code>\n**Or you can use this command to enable I2C:\n\n<code>sudo raspi-config<\/code>\n\n[thumb|left|800px](\/docs\/File:Lm75.png)\n<br style=\"clear:both;\">\n**Select as this picture, then you can enable I2C easily.\n[thumb|left|800px](\/docs\/File:Lm752.png)\n<br style=\"clear:both;\">\n*Please Remember to reboot your Raspberry Pi.\n*After rebooting, please open a terminal and input this command to get temperature:\n\n<code>\ni2cget -y 1 0x48 0x00 w |awk '{printf(\"%0.1f C\\n\",(a=(((\"0x\"substr($1,5,2)substr($1,3,1))*0.0625)+0.1) )>128?a-256:a)}'\n<\/code>\n\nResult:\n\n[thumb|left|800px](\/docs\/File:Lm753.png)\n<br style=\"clear:both;\">\n----",
                "char_count": 975,
                "token_estimate": 244
            },
            {
                "title": "EP-0031",
                "rev_id": 10883,
                "heading_path": "Examples",
                "chunk_index": 9,
                "content": "*Shell scripts:\n\nYou can create a file called lm75.sh  and edit as following:\n\n<code>#!\/bin\/bash\n\nwhile true\n\ndo\n\ni2cget -y 1 0x48 0x00 w | awk '{printf(\"%.1f C.\\n\", (a=(((\"0x\"substr($1,5,2)substr($1,3,1))*0.0625)+0.1) )>128?a-256:a)}'\n\nsleep 1\n\ndone<\/code>\n\nand set an execute right to this file:\n\n<code>chmod +x lm75.sh  &&  bash lm75.sh<\/code>\n\n----\n*C code: You can login to your Raspberry Pi and open a terminal, and then download the zip package from this link below:\n[File:LM75_C.tar.gz.zip ‎](\/docs\/File:LM75_C.tar.gz.zip ‎)\n\nunzip it and compile it.\n\n<code>\nunzip LM75_C.tar.gz.zip\n\ntar -xf LM75_C.tar.gz\n\ncd LM75_C\/\n\nmake\n\n.\/test.o\n\n<\/code>\n[thumb|left|800px](\/docs\/File:Lm75c.png)\n<br style=\"clear:both;\">\n----\n*Python running in command line:\n\n**If you want to use python to drive this sensor, you have to install this two packages first.\n<code>sudo apt-get update<\/code>\n\n<code>sudo apt-get install -y  python-smbus  python-scipy<\/code>\n\n**Create a file called LM75.py as below:\n<pre>\nimport time\nimport smbus\n\nLM75_ADDRESS\t\t = 0x48\n\nLM75_TEMP_REGISTER \t = 0\nLM75_CONF_REGISTER \t = 1\nLM75_THYST_REGISTER \t = 2\nLM75_TOS_REGISTER \t = 3",
                "char_count": 1146,
                "token_estimate": 287
            },
            {
                "title": "EP-0031",
                "rev_id": 10883,
                "heading_path": "Examples",
                "chunk_index": 10,
                "content": "LM75_CONF_SHUTDOWN  \t = 0\nLM75_CONF_OS_COMP_INT \t = 1\nLM75_CONF_OS_POL \t = 2\nLM75_CONF_OS_F_QUE \t = 3\n\nclass LM75(object):\n\tdef (self, mode=LM75_CONF_OS_COMP_INT, address=LM75_ADDRESS, busnum=1):\n\t\tself._mode = mode\n\t\tself._address = address\n\t\tself._bus = smbus.SMBus(busnum)\n\ndef regdata2float (self, regdata):\n\t\treturn (regdata \/ 32.0) \/ 8.0\n\tdef toFah(self, temp):\n\t\treturn (temp * (9.0\/5.0)) + 32.0\n\ndef getTemp(self):\n\t\traw = self._bus.read_word_data(self._address, LM75_TEMP_REGISTER) & 0xFFFF\n\t\traw = ((raw << 8) & 0xFF00) + (raw >> 8)\n\t\treturn self.toFah(self.regdata2float(raw))\n<\/pre>\nand  then create another file called test.py:\n\n<pre>\nimport LM75\n\nsensor = LM75.LM75()\n\nprint sensor.getTemp()\n<\/pre>\n**execute by this command:\n\n<code>python test.py<\/code>\n[thumb|left|600px](\/docs\/File:Lm75python.png)\n<br style=\"clear:both;\">\n----",
                "char_count": 844,
                "token_estimate": 211
            },
            {
                "title": "EP-0031",
                "rev_id": 10883,
                "heading_path": "FAQ",
                "chunk_index": 11,
                "content": "*Question:  I've tried to measure temperature with LM75B sensor that bought from your store, but why did i get the data that can not approach to the 0.125 resolution ?\n**Answer:  Because the accuracy resolution is lower than ADC resolution,so you can not get the exactly temperature.\n*Question: why the temperature that i measured is far away from my friend's data?\n**Answer: Because different environment can cause the resolution change, for example, your system is too busy or there is a heat source nearby may cause the resolution have some offsets.\n----",
                "char_count": 557,
                "token_estimate": 140
            },
            {
                "title": "EP-0031",
                "rev_id": 10883,
                "heading_path": "Reference",
                "chunk_index": 12,
                "content": "http:\/\/www.ti.com\/product\/LM75B\n----",
                "char_count": 36,
                "token_estimate": 9
            }
        ]
    }
}