1st Build

Announcement Date: July 3, 2015

My First Build is a temp controlled fans

i needed temp controlled fans for another project so i grabbed my arduino and found some code…..

what i used :
Arduino UNO
LCDshield
SainSmart 5v Relay Board
Temperatursensor – LM35DZ 0 til 110°C TO-92
The Code : (i found my setup here : arduino-temperature-controlled-relay)

i changed it a bit, when it hit 30-29 it flip flops , but with the new code it is steady.
1. fan starts at 30c

#include <LiquidCrystal.h>
int reading = 0;
int sensorPin = A1;
int relay = 3;
int relay2 = 1;
//int celsius;
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

void setup() {
// set up the LCD’s number of columns and rows:
lcd.begin(16, 2);

pinMode(relay,OUTPUT);
pinMode(relay2,OUTPUT);
}

void loop() {
reading = analogRead(sensorPin);
int celsius = reading/2;
lcd.setCursor(0, 0);
lcd.print(“Temperature:”);
lcd.print(celsius, DEC);
lcd.print((char)223);
lcd.print(“C”);

if (celsius >29)
{
digitalWrite(3,HIGH);
lcd.setCursor(0,1);
lcd.print(” IM COOLING OFF”);
}

else if (celsius <26)

{
digitalWrite(3,LOW);
lcd.setCursor(0,1);
lcd.print(” IM COOL”);
}
else
{
lcd.setCursor(0,1);
lcd.print(” GOD SOMMERLEJR”);
}
delay(1000);
lcd.clear();

}