Quantcast
Channel: Arduino Forum - Latest topics
Viewing all articles
Browse latest Browse all 15238

HDC1080 only returning maximum temp value - 125degrees

$
0
0

I would like to know if there is something wrong with our code. It used to work and returned the actual temp values before but all of a sudden it now only returns 125 degrees.

#include <ClosedCube_HDC1080.h>

const int relay = 7;  
const int flamePIN = 9;
int Flame = HIGH;

ClosedCube_HDC1080 hdc1080;

void setup() {
  pinMode(relay, OUTPUT);
  pinMode(flamePIN, INPUT);
  hdc1080.begin(0x40);
  Serial.begin(9600);
}

void loop() {

  Flame = digitalRead(flamePIN);
  Serial.println(hdc1080.readTemperature());

  digitalWrite(relay, LOW);

  if (Flame == LOW)
  {
    Serial.println("Fire!!!");
    digitalWrite(relay, HIGH);
  }
  else
  {
    Serial.println("No fire!");
    digitalWrite(relay, LOW);
  }

  delay(500);
}

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 15238

Trending Articles