Advertisement
Guest User

Untitled

a guest
Dec 17th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. #include <DS1307.h>
  2. #include <Wire.h>
  3. #define DS1307_ADDRESS 0x68
  4.  
  5. #include <LiquidCrystal_I2C.h>
  6. #include <DallasTemperature.h>
  7. #include <OneWire.h>
  8. #define BACKLIGHT_PIN 3 //lcd
  9. #define ONE_WIRE_BUS 11
  10.  
  11. byte zero = 0x00;
  12. OneWire oneWire(ONE_WIRE_BUS); //termometr - one wire
  13. DallasTemperature sensors(&oneWire); //termometr
  14. LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7);
  15.  
  16. int LED1 = 11;
  17.  
  18. int T1 = 11;
  19.  
  20. int GODZ;
  21. int MIN;
  22. int SEC;
  23.  
  24.  
  25. void setup()
  26. {
  27.  
  28. Wire.begin();
  29.  
  30. pinMode(LED1, OUTPUT);
  31.  
  32. pinMode(T1, INPUT);
  33.  
  34. Serial.begin(9600);
  35. }
  36.  
  37. void loop()
  38. {
  39. GODZ = (RTC.get(DS1307_HR,true));
  40. MIN = (RTC.get(DS1307_MIN,true));
  41. SEC = (RTC.get(DS1307_SEC,true));
  42. Serial.println(GODZ);
  43. Serial.println(MIN);
  44. Serial.println(SEC);
  45. delay (100);
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement