Envico_Thermometer.php 6279 Bytes 02-04-2024 16:26:48
ENVICO®light
Thermometer Adapter
✈ Circuit Description
This Adapter / Sensor consists only of one integrated circuit. This is an TMP-101 from Texas Instruments. Yes, we have heard, that
there are more accurate sensors available :-)
Therefore this is not intended to compete with professional weather stations. Just to show and test the functionality of the system.
Quasi a source of data which we have control over it.
✈ Downloads
✈ Arduino Sketch - The TEST - Code
Double click on code to select ...
/*
Standalone Sketch to test the Temperature sensor with an TMP101
https://www.changpuak.ch/electronics/envico/ENVICO_TEMPERATURE/TMP100-TMP101.pdf
(Just to test the sensor and the I2C communication)
Alexander C. Frank, 16.06.2015, Version 1.0
*/
#include <Wire.h>
byte I2C_address = 0x49;
void setup()
{
Wire.begin(); // join i2c bus (address optional for master)
Serial.begin(9600); // start serial for output
// INIT TMP101 - SET RESOLUTION TO 12 Bits
Wire.beginTransmission(I2C_address);
Wire.write(0x01); // Configuration Register
Wire.write(0x60); // R0 and R1 = 1
Wire.endTransmission();
}
void loop()
{
Wire.beginTransmission(I2C_address);
Wire.write(0x00);
Wire.endTransmission();
Wire.requestFrom(I2C_address,2);
int temp_hi = Wire.read(); // integer value
int temp_lo = Wire.read(); // fractional value
int temp = (( temp_hi << 8 ) | temp_lo ) >> 4 ;
float temperature = temp * 0.0625 ;
Serial.print(temperature,3);Serial.print(" ");Serial.print((char)176);Serial.println("C");
delay(1000);
}
✈ Share your thoughts
The webmaster does not read these comments regularely. Urgent questions should be send via email.
Ads or links to completely uncorrelated things will be removed.
Your Browser says that you allow tracking. Mayst we suggest that you check that DNT thing ?