A I2C controlled, LCD enabled Thermometer: Unterschied zwischen den Versionen

Aus DL8RDS Wiki
Wechseln zu: Navigation, Suche
(Images)
Zeile 4: Zeile 4:
 
* Arduino Mini Pro
 
* Arduino Mini Pro
 
* JHD 162A LCD display
 
* JHD 162A LCD display
* SE95 I2C temperature sensor
+
* SE95 I2C temperature sensor on a board from Horter & Kalb http://www.horter.de/i2c/index.htm
 
* 25 kiloOhm Poti
 
* 25 kiloOhm Poti
 
* 1 kiloOhm Poti
 
* 1 kiloOhm Poti

Version vom 3. November 2009, 02:06 Uhr

Here's a demonstration of a very tiny Arduino project: It's a microcontroller driven very precise digital thermometer.

1 Ingredients =

  • Arduino Mini Pro
  • JHD 162A LCD display
  • SE95 I2C temperature sensor on a board from Horter & Kalb http://www.horter.de/i2c/index.htm
  • 25 kiloOhm Poti
  • 1 kiloOhm Poti
  • Breadboard
  • 3x AA Alkaline cell

2 Program

Here's the sketch:

#include <Wire.h>

#define tmpaddress 0x48

void setup()
{
  Wire.begin();
  Serial.begin(1200);
}

void loop()
{
  // get the temperature
  Wire.beginTransmission(tmpaddress);
  Wire.send(0x00);
  Wire.requestFrom(tmpaddress, 1);
  int temperature = 0;
  if (Wire.available()) {
    temperature = Wire.receive();
  }
  Wire.endTransmission();

  Serial.println("-----------");
  Serial.println(temperature-3);
  delay(1000);
}

3 Tests

  • battery voltage: 4,79 V
  • current: 17 mA
  • power consumption: 81 mW

4 Images

I2C-Controlled LCD-enabled Thermometer.jpg

I2C-Controlled LCD-enabled Thermometer BreadBoard closeUp.jpg