Tell us about yourself!

Complete Your Profile
  • esumon commented on Dylon124's instructable Arduino LCD Thermostat!4 hours ago
    Arduino LCD Thermostat!

    HiThis is Eabul.i want to save data to eeprom from press button . when TemperatureUp button press. increase float data like as 0.01> 0.02--------30.10> 30.61and this value save to eeprom.and when TemperatureDown button press . decrease float data like as 30.60>30.59-----29.10and update minus value eepromand increase and decrease valud view lcd display .but when press button save int number not float. and show me lcd display int value.please help how to write and read float value from eeprom. press button. hear my code.//For Display #include <LiquidCrystal595.h> // 3wire display LiquidCrystal595 lcd(4, 3, 2); // DS, ST_CP, SH_CP//For time #include <Wire.h> #include <RTClib.h> RTC_DS1307 RTC;//for humidity #include "DHT.h" DHT dht;//for st...

    see more »

    HiThis is Eabul.i want to save data to eeprom from press button . when TemperatureUp button press. increase float data like as 0.01> 0.02--------30.10> 30.61and this value save to eeprom.and when TemperatureDown button press . decrease float data like as 30.60>30.59-----29.10and update minus value eepromand increase and decrease valud view lcd display .but when press button save int number not float. and show me lcd display int value.please help how to write and read float value from eeprom. press button. hear my code.//For Display #include <LiquidCrystal595.h> // 3wire display LiquidCrystal595 lcd(4, 3, 2); // DS, ST_CP, SH_CP//For time #include <Wire.h> #include <RTClib.h> RTC_DS1307 RTC;//for humidity #include "DHT.h" DHT dht;//for stor tempereratur and humidity #include <EEPROM.h> int SetHumidity; int HumidityUp = 10; // switch up is at pin 10 int HumidityDown = 11; // switch down is at pin 11 float fix = 0.01; float settemp; // make a variable called temp float TemperatureUp = 12; // switch up is at pin 12 float TemperatureDown = 13; // switch down is at pin 13//result view int led = 0; // led is at pin 0void setup() { //For timer Wire.begin(); RTC.begin(); //For welcome screen lcd.begin(16,4); lcd.setCursor(0,0); lcd.print("Welcome Elab"); delay(2000); lcd.clear(); //for dht-11 pin setup dht.setup(A1); // data pin 2 }void loop() {//For tempererature up / down float temp[3]; getTemp(temp); float tempererature = temp[1]; settemp = EEPROM.read(1); // read the settemp on the eeprom if(digitalRead(TemperatureUp) == 1 ) { settemp+=fix; settemp++; EEPROM.write (1, settemp); /* write the most recent settemp in eeprom data stoage*/ } else {} if(digitalRead (TemperatureDown) == 1) { settemp -= fix; settemp--; EEPROM.write (1, settemp); /* write the most recent settemp in eeprom data stoage*/} if (tempererature >= settemp) { digitalWrite (led, 1); } else { digitalWrite (led, 0);} //else { }; lcd.setCursor(0,0); lcd.print("T:"); lcd.print(tempererature); lcd.setCursor(8,0); lcd.print ("ST"); lcd.print (settemp); lcd.print((char)223); //End tempererature controll//For humidity up / down SetHumidity = EEPROM.read(2); int humidity = dht.getHumidity(); if(digitalRead(HumidityUp ) == 0 ) {SetHumidity++ ; } // add one to the settemp else {} if(digitalRead (HumidityDown) == 0) { SetHumidity--; } // Reduse settemp else { }; lcd.setCursor (0, 1); lcd.print ("CH:"); lcd.print (humidity); lcd.print ("%"); lcd.setCursor (8, 1); lcd.print ("SH:"); lcd.print (SetHumidity); lcd.print ("%"); delay (1); // wait 100 milliseconds EEPROM.write (2, SetHumidity); /* write the most recent settemp in eeprom data stoage*/ //End tempererature controll controll} //analog temperaturevoid getTemp(float * t){ const int analogPin = 0; // replace 0 with analog pin const float invBeta = 1.00 / 3380.00; // replace "Beta" with beta of thermistor const float adcMax = 1023.00; const float invT0 = 1.00 / 298.15; // room temp in Kelvin int adcVal, i, numSamples = 5; float K, C, F; adcVal = 0; for (i = 0; i < numSamples; i++) { adcVal = adcVal + analogRead(analogPin); delay(100); } adcVal = adcVal/5; K = 1.00 / (invT0 + invBeta*(log ( adcMax / (float) adcVal - 1.00))); C = K - 273.15; // convert to Celsius F = ((9.0*C)/5.00) + 32.00; // convert to Fahrenheit t[0] = K; t[1] = C; t[2] = F; return;}

    View Instructable »