TMP36 Python

August 1, 2023, 18:20

honigbrottoaster

Does anybody know how to read data fromm the TMP36 sensor? I cannot find anything helpful on the internet. I have a raspberry Pi 4b with raspberry pi os lite 64 bit installed. I need to have a script that can read the data from this sensor, or i have to connect to arduino but that is not what i want. Please Help!

oops.se

From the datasheet: "The TMP35/TMP36/TMP37 are low voltage, precision centigrade temperature sensors. They provide a voltage output that is linearly proportional to the Celsius (centigrade) temperature." TPM36 "provide a voltage output" = Analogue device and Raspberry Pi doesn't have any Analogue pins. But with an external A/D converter you can read the TMP36 analogue value. Here is a nice tutorial: https://www.abelectronics.co.uk/kb/article/14/adc-pi-with-tmp36

honigbrottoaster

thanks ill try this

honigbrottoaster

are there any special sensors for the pi4b?

oops.se

No, but digital sensors are a bit easier to interface. From the top of my head, temp sensor like DS18B20 is digital and affordable.

honigbrottoaster

i used one with I2c instead. But thanks a lot